-
Notifications
You must be signed in to change notification settings - Fork 300
adopt ci gha #4503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
adopt ci gha #4503
Changes from 14 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
271daf5
adopt ci gha
bjlittle 632990e
bump iris-test-data to latest version
bjlittle 55155ba
ci noxify
bjlittle 362e270
remove dummy cache key name
bjlittle 8c8cb33
remove precommit nox task
bjlittle 0cf86c3
added whatsnew entry
bjlittle 3e1e697
remove mpl cfg for linkcheck
bjlittle 4a7fdf0
trial composite nox-cache
bjlittle 008df06
composite iris-data-cache action
bjlittle 1b4ef90
composite conda-env-cache action
bjlittle 2a2178b
composite conda-pkg-cache action
bjlittle 4a0f800
composite cartopy-cache action
bjlittle 4cf89d6
required lock-file composite action input
bjlittle adb510f
review action
bjlittle f5936a0
review action
bjlittle 9bb2654
nox inputs.lock_file
bjlittle 4dde001
env_name composite action input
bjlittle 831679f
replace HOME with tilde usage
bjlittle 5f33f5e
cancel in-progress workflow jobs
bjlittle 2961b02
refresh-lockfiles gha note
bjlittle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| # reference: | ||
| # - https://github.com/actions/cache | ||
| # - https://github.com/actions/checkout | ||
| # - https://github.com/marketplace/actions/setup-miniconda | ||
|
|
||
| name: ci-docs-linkcheck | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - "*" | ||
| pull_request: | ||
| branches: | ||
| - "*" | ||
|
|
||
| jobs: | ||
| tests: | ||
| name: "linkcheck ${{ matrix.os }} ${{ matrix.python-version }}" | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash -l {0} | ||
|
|
||
| strategy: | ||
| matrix: | ||
| os: ["ubuntu-latest"] | ||
| python-version: ["3.8"] | ||
|
|
||
| env: | ||
| ENV_NAME: "ci-docs-linkcheck" | ||
|
|
||
| steps: | ||
| - name: "checkout" | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: "environment configure" | ||
| env: | ||
| # Maximum cache period (in weeks) before forcing a cache refresh. | ||
| CACHE_WEEKS: 2 | ||
| run: | | ||
| echo "CACHE_PERIOD=$(date +%Y).$(expr $(date +%U) / ${CACHE_WEEKS})" >> ${GITHUB_ENV} | ||
| echo "LOCK_FILE=requirements/ci/nox.lock/py$(echo ${{ matrix.python-version }} | tr -d '.')-linux-64.lock" >> ${GITHUB_ENV} | ||
|
|
||
| - name: "conda package cache" | ||
| uses: ./.github/workflows/composite/conda-pkg-cache | ||
| with: | ||
| cache_build: 0 | ||
| cache_period: ${{ env.CACHE_PERIOD }} | ||
|
|
||
| - name: "conda install" | ||
| uses: conda-incubator/setup-miniconda@v2 | ||
| with: | ||
| miniforge-version: latest | ||
| channels: conda-forge,defaults | ||
| activate-environment: ${{ env.ENV_NAME }} | ||
| auto-update-conda: false | ||
| use-only-tar-bz2: true | ||
|
|
||
| - name: "conda environment cache" | ||
| uses: ./.github/workflows/composite/conda-env-cache | ||
| with: | ||
| cache_build: 0 | ||
| cache_period: ${{ env.CACHE_PERIOD }} | ||
| install_packages: "nox pip" | ||
|
|
||
| - name: "conda info" | ||
| run: | | ||
| conda info | ||
| conda list | ||
|
|
||
| - name: "nox cache" | ||
| uses: ./.github/workflows/composite/nox-cache | ||
| with: | ||
| cache_build: 0 | ||
| lock_file: ${{ env.LOCK_FILE }} | ||
|
|
||
| - name: "iris linkcheck" | ||
| env: | ||
| PY_VER: ${{ matrix.python-version }} | ||
| run: | | ||
| nox --session linkcheck -- --verbose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| # reference: | ||
| # - https://github.com/actions/cache | ||
| # - https://github.com/actions/checkout | ||
| # - https://github.com/marketplace/actions/setup-miniconda | ||
|
|
||
| name: ci-docs-tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - "*" | ||
| pull_request: | ||
| branches: | ||
| - "*" | ||
|
|
||
| jobs: | ||
| tests: | ||
| name: "doctests ${{ matrix.os }} ${{ matrix.python-version }}" | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash -l {0} | ||
|
|
||
| strategy: | ||
| matrix: | ||
| os: ["ubuntu-latest"] | ||
| python-version: ["3.8"] | ||
|
|
||
| env: | ||
| IRIS_TEST_DATA_VERSION: "2.9" | ||
| ENV_NAME: "ci-docs-tests" | ||
|
|
||
| steps: | ||
| - name: "checkout" | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: "environment configure" | ||
| env: | ||
| # Maximum cache period (in weeks) before forcing a cache refresh. | ||
| CACHE_WEEKS: 2 | ||
| run: | | ||
| echo "CACHE_PERIOD=$(date +%Y).$(expr $(date +%U) / ${CACHE_WEEKS})" >> ${GITHUB_ENV} | ||
| echo "LOCK_FILE=requirements/ci/nox.lock/py$(echo ${{ matrix.python-version }} | tr -d '.')-linux-64.lock" >> ${GITHUB_ENV} | ||
|
|
||
| - name: "data cache" | ||
| uses: ./.github/workflows/composite/iris-data-cache | ||
| with: | ||
| cache_build: 0 | ||
| version: ${{ env.IRIS_TEST_DATA_VERSION }} | ||
|
|
||
| - name: "conda package cache" | ||
| uses: ./.github/workflows/composite/conda-pkg-cache | ||
| with: | ||
| cache_build: 0 | ||
| cache_period: ${{ env.CACHE_PERIOD }} | ||
|
|
||
| - name: "conda install" | ||
| uses: conda-incubator/setup-miniconda@v2 | ||
| with: | ||
| miniforge-version: latest | ||
| channels: conda-forge,defaults | ||
| activate-environment: ${{ env.ENV_NAME }} | ||
| auto-update-conda: false | ||
| use-only-tar-bz2: true | ||
|
|
||
| - name: "conda environment cache" | ||
| uses: ./.github/workflows/composite/conda-env-cache | ||
| with: | ||
| cache_build: 0 | ||
| cache_period: ${{ env.CACHE_PERIOD }} | ||
| install_packages: "cartopy nox pip" | ||
|
|
||
| - name: "conda info" | ||
| run: | | ||
| conda info | ||
| conda list | ||
|
|
||
| - name: "cartopy cache" | ||
| uses: ./.github/workflows/composite/cartopy-cache | ||
| with: | ||
| cache_build: 0 | ||
| cache_period: ${{ env.CACHE_PERIOD }} | ||
|
|
||
| - name: "nox cache" | ||
| uses: ./.github/workflows/composite/nox-cache | ||
| with: | ||
| cache_build: 0 | ||
| lock_file: ${{ env.LOCK_FILE }} | ||
|
|
||
| # TODO: drop use of site.cfg and explicit use of mplrc | ||
| - name: "iris configure" | ||
| env: | ||
| SITE_CFG: lib/iris/etc/site.cfg | ||
| MPL_RC: ${HOME}/.config/matplotlib/matplotlibrc | ||
| run: | | ||
| mkdir -p $(dirname ${SITE_CFG}) | ||
| echo ${SITE_CFG} | ||
| echo "[Resources]" >> ${SITE_CFG} | ||
| echo "test_data_dir = ${HOME}/iris-test-data/test_data" >> ${SITE_CFG} | ||
| echo "doc_dir = ${GITHUB_WORKSPACE}/docs" >> ${SITE_CFG} | ||
| cat ${SITE_CFG} | ||
| mkdir -p $(dirname ${MPL_RC}) | ||
| echo ${MPL_RC} | ||
| echo "backend : agg" >> ${MPL_RC} | ||
| echo "image.cmap : viridis" >> ${MPL_RC} | ||
| cat ${MPL_RC} | ||
trexfeathers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: "iris doctests and gallery" | ||
| env: | ||
| PY_VER: ${{ matrix.python-version }} | ||
| run: | | ||
| nox --session doctest -- --verbose | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.