Revert "Ignore deprecation warnings coming from upstream gwcs package" #1210
This file contains 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
name: CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
# run every Wednesday at 5pm UTC | |
- cron: '17 0 * * 3' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Code style checks | |
os: ubuntu-latest | |
python: 3.x | |
toxenv: codestyle | |
- name: Python 3.11 with remote data and coverage | |
os: ubuntu-latest | |
python: '3.11' | |
toxenv: py311-test-cov | |
toxargs: -v | |
toxposargs: --remote-data=any | |
- name: Python 3.12 (Windows) | |
os: windows-latest | |
python: '3.12' | |
toxenv: py312-test | |
- name: Python 3.10 (MacOS) | |
os: macos-latest | |
python: '3.10' | |
toxenv: py310-test | |
- name: Python 3.10 with oldest supported version of key dependencies | |
os: ubuntu-latest | |
python: '3.10' | |
toxenv: py310-test-oldestdeps | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Python dependencies | |
run: python -m pip install --upgrade tox | |
- name: Run tests | |
run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }} | |
# TODO: Do we need --gcov-glob "*cextern*" ? | |
- name: Upload coverage to artifacts | |
if: ${{ contains(matrix.toxenv,'-cov') }} | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: coverage_${{ matrix.toxenv }}.xml | |
path: coverage.xml | |
if-no-files-found: error | |
upload-codecov: | |
needs: [ tests ] | |
permissions: | |
contents: none | |
runs-on: ubuntu-latest | |
name: Upload Coverage | |
steps: | |
- name: Download coverage artifacts | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
path: coverage | |
pattern: coverage_* | |
merge-multiple: true | |
- name: Upload report to Codecov | |
if: ${{ hashFiles('coverage/') != '' }} | |
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: coverage | |
fail_ci_if_error: true | |
verbose: true | |
allowed_failures: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: (Allowed Failure) Python 3.12 with remote data and dev version of key dependencies | |
os: ubuntu-latest | |
python: '3.12' | |
toxenv: py312-test-devdeps | |
toxposargs: --remote-data=any | |
# doctest failure due to different no. of significant digits on arm64 (#1146) | |
- name: Python 3.12 (macOS) | |
os: macos-latest | |
python: '3.12' | |
toxenv: py312-test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Python dependencies | |
run: python -m pip install --upgrade tox | |
- name: Run tests | |
run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }} |