1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
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: macos-latest
python: '3.13'
tox_env: 'py313-test-alldeps'
allow_failure: false
prefix: ''
- os: windows-latest
python: '3.13'
tox_env: 'py313-test-alldeps'
allow_failure: false
prefix: ''
- os: ubuntu-latest
python: '3.13'
tox_env: 'py312-test-alldeps-cov'
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: ''
# test without all dependencies
- os: ubuntu-latest
python: '3.13'
tox_env: 'py313-test'
toxposargs: --remote-data=any
allow_failure: false
prefix: ''
- os: ubuntu-latest
python: '3.13'
tox_env: 'codestyle'
allow_failure: false
prefix: ''
- os: ubuntu-latest
python: '3.13'
tox_env: 'pep517'
allow_failure: false
prefix: ''
- os: ubuntu-latest
python: '3.13'
tox_env: 'bandit'
allow_failure: false
prefix: ''
- 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.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@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
with:
files: ./coverage.xml
verbose: true
|