Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/build-python-package/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ runs:
using: composite

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version }}
cache: 'pip'
Expand All @@ -30,7 +30,7 @@ runs:
pip install build
python3 -m build

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: ${{ inputs.artifact-name }}
path: "dist/"
7 changes: 4 additions & 3 deletions .github/actions/environment/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,23 @@ runs:

steps:
# Used for the pip cache, not for the python version
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version }}
cache: 'pip'
cache-dependency-path: |
continuous-integration/requirements-${{ inputs.python-version }}.txt
continuous-integration/environment.yaml
setup.cfg

- name: Fetch built emsarray package
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: ${{ inputs.package-artifact-name }}
path: "dist/"

- name: Cache conda packages
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/conda_pkgs_dir
key:
Expand Down
39 changes: 24 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
outputs:
artifact-name: ${{ steps.build.outputs.artifact-name }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: ./.github/actions/build-python-package
id: build
with:
Expand All @@ -39,8 +39,8 @@ jobs:
if: startsWith(github.head_ref, 'release-')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: actions/checkout@v5
with:
repository: conda-forge/emsarray-feedstock
path: emsarray-feedstock
Expand Down Expand Up @@ -75,42 +75,51 @@ jobs:


steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: ./.github/actions/environment
with:
python-version: ${{ matrix.python-version }}
package-artifact-name: ${{ needs.build.outputs.artifact-name }}
dependencies: ${{ matrix.dependencies }}
strict: "true"

- run: |
echo "MATRIX_TAG=py${MATRIX_PYTHON_VERSION}-${MATRIX_DEPENDENCIES}-deps" >> "$GITHUB_ENV"
env:
MATRIX_PYTHON_VERSION: ${{ matrix.python-version }}
MATRIX_DEPENDENCIES: ${{ matrix.dependencies }}

- name: Run tests
shell: bash -l {0}
run: |
pytest -v \
--mpl \
--mpl-results-path=./mpl-results \
--mpl-generate-summary html \
--junitxml=junit-py${{ matrix.python-version }}.xml \
--junitxml=junit-${MATRIX_TAG}.xml \
--cov --cov-report term \
--cov-report xml:coverage-${{ matrix.python-version }}.xml
--cov-report xml:coverage-${MATRIX_TAG}.xml

- name: JUnit Report
uses: mikepenz/action-junit-report@v5
- name: JUnit report
uses: mikepenz/action-junit-report@v6
if: always()
with:
report_paths: 'junit-py*.xml'
check_name: "JUnit Test Report - python ${{ matrix.python-version }}, ${{ matrix.dependencies }} dependencies"
check_name: "JUnit test report - ${{ env.MATRIX_TAG }}"
annotate_only: true
job_summary: false

- name: MPL image comparison report
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: ${{ failure() }}
with:
name: "MPL image comparison report - python ${{ matrix.python-version }}, ${{ matrix.dependencies }} dependencies"
path: './mpl-results'
# No guarantee that the test failures were due to image comparisons
if-no-files-found: 'ignore'

- uses: actions/upload-artifact@v4
- name: Code coverage report
uses: actions/upload-artifact@v7
with:
name: Code coverage for Python ${{ matrix.python-version }}, ${{ matrix.dependencies }} dependencies
path: coverage-*.xml
Expand All @@ -125,14 +134,14 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: ./.github/actions/environment
with:
python-version: ${{ env.python-version }}
package-artifact-name: ${{ needs.build.outputs.artifact-name }}

- name: 'mypy cache'
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: '.mypy_cache'
key: mypy-${{ runner.os }}-py${{ env.python-version }}-${{ hashFiles(format('continuous-integration/requirements-{0}.txt', env.python-version)) }}
Expand All @@ -151,7 +160,7 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: ./.github/actions/environment
with:
python-version: ${{ env.python-version }}
Expand Down Expand Up @@ -181,7 +190,7 @@ jobs:
sphinx-build -b dirhtml -aEW . _build/dirhtml

- name: Store compiled docs artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: Docs
path: docs/_build/dirhtml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-tags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
outputs:
artifact-name: ${{ steps.build.outputs.artifact-name }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: ./.github/actions/build-python-package
id: build
with:
Expand All @@ -28,7 +28,7 @@ jobs:

steps:
- name: Fetch Python package
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: ${{ needs.build.outputs.artifact-name }}
path: "dist"
Expand Down
2 changes: 2 additions & 0 deletions docs/releases/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ Next release (in development)
* Monkeypatch the cartopy GSHHS downloader to use the new URL from
the University of Hawaii
(:pr:`225`, :pr:`SciTools/cartopy#2659`).
* Silence all warnings in CI
(:pr:`227`).