Merge pull request #2246 from larrybradley/peakfinder-minsep #3160
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
| name: CI Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| pull_request: | |
| schedule: | |
| # run every Monday at 6am UTC | |
| - cron: '0 6 * * 1' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| TOXARGS: '-v' | |
| permissions: | |
| contents: read | |
| jobs: | |
| tests: | |
| name: ${{ matrix.prefix }} ${{ matrix.os }}, ${{ matrix.tox_env }} | |
| runs-on: ${{ matrix.os }} | |
| continue-on-error: ${{ matrix.allow_failure }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| python: '3.11' | |
| tox_env: 'py311-test-oldestdeps' | |
| allow_failure: false | |
| prefix: '' | |
| - os: ubuntu-latest | |
| python: '3.11' | |
| tox_env: 'py311-test-alldeps' | |
| allow_failure: false | |
| prefix: '' | |
| - os: ubuntu-latest | |
| python: '3.12' | |
| tox_env: 'py312-test-alldeps' | |
| allow_failure: false | |
| prefix: '' | |
| - os: ubuntu-latest | |
| python: '3.13' | |
| tox_env: 'py313-test-alldeps' | |
| allow_failure: false | |
| prefix: '' | |
| - os: ubuntu-latest | |
| python: '3.14' | |
| tox_env: 'py314-test-alldeps-cov' | |
| toxposargs: --remote-data=any | |
| allow_failure: false | |
| prefix: '' | |
| # test without all dependencies | |
| - os: ubuntu-latest | |
| python: '3.14' | |
| tox_env: 'py314-test' | |
| toxposargs: --remote-data=any | |
| allow_failure: false | |
| prefix: '' | |
| # cannot use alldeps: rasterio does not have a arm64 wheel | |
| - os: ubuntu-24.04-arm | |
| python: '3.13' | |
| tox_env: 'py313-test' | |
| allow_failure: false | |
| prefix: '' | |
| # no rasterio wheel for 3.14 yet | |
| - os: macos-latest | |
| python: '3.13' | |
| tox_env: 'py313-test-alldeps' | |
| allow_failure: false | |
| prefix: '' | |
| # no rasterio wheel for 3.14 yet | |
| - os: windows-latest | |
| python: '3.13' | |
| tox_env: 'py313-test-alldeps' | |
| allow_failure: false | |
| prefix: '' | |
| - os: ubuntu-latest | |
| python: '3.x' | |
| tox_env: 'codestyle' | |
| allow_failure: false | |
| prefix: '' | |
| - os: ubuntu-latest | |
| python: '3.x' | |
| tox_env: 'pep517' | |
| allow_failure: false | |
| prefix: '' | |
| - os: ubuntu-latest | |
| python: '3.x' | |
| tox_env: 'bandit' | |
| allow_failure: false | |
| prefix: '' | |
| # no rasterio wheel for 3.14 yet | |
| - os: ubuntu-latest | |
| python: '3.13' | |
| tox_env: 'py313-test-devdeps' | |
| toxposargs: --remote-data=any | |
| allow_failure: true | |
| prefix: '(Allowed failure)' | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Set up Python ${{ matrix.python }} | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| allow-prereleases: true | |
| - name: Install base dependencies | |
| run: python -m pip install --upgrade pip setuptools tox | |
| - name: Print Python, pip, setuptools, and tox versions | |
| run: | | |
| python -c "import sys; print(f'Python {sys.version}')" | |
| python -c "import pip; print(f'pip {pip.__version__}')" | |
| python -c "import setuptools; print(f'setuptools {setuptools.__version__}')" | |
| python -c "import tox; print(f'tox {tox.__version__}')" | |
| - name: Run tests | |
| run: python -m tox -e ${{ matrix.tox_env }} -- -n=2 ${{ matrix.toxposargs }} | |
| - name: Upload coverage to codecov | |
| if: ${{ contains(matrix.tox_env, '-cov') }} | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| verbose: true |