| 1 |
name: CI |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- main |
| 7 |
pull_request: |
| 8 |
branches: |
| 9 |
- main |
| 10 |
|
| 11 |
concurrency: |
| 12 |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 13 |
cancel-in-progress: true |
| 14 |
|
| 15 |
jobs: |
| 16 |
test: |
| 17 |
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }} |
| 18 |
runs-on: ${{ matrix.os }} |
| 19 |
strategy: |
| 20 |
matrix: |
| 21 |
os: [ubuntu-latest, windows-latest] |
| 22 |
python-version: ['3.10', 3.11, 3.12, 3.13, 3.14] |
| 23 |
|
| 24 |
steps: |
| 25 |
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 26 |
|
| 27 |
- name: Additional info about the build |
| 28 |
shell: bash |
| 29 |
run: | |
| 30 |
uname -a |
| 31 |
df -h |
| 32 |
ulimit -a |
| 33 |
|
| 34 |
|
| 35 |
# More info on options: https://github.com/conda-incubator/setup-miniconda |
| 36 |
- uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1 |
| 37 |
with: |
| 38 |
python-version: ${{ matrix.python-version }} |
| 39 |
conda-build-version: "*" |
| 40 |
environment-file: devtools/conda-envs/test_env.yaml |
| 41 |
|
| 42 |
channels: defaults |
| 43 |
|
| 44 |
activate-environment: test_env |
| 45 |
auto-update-conda: false |
| 46 |
auto-activate-base: false |
| 47 |
show-channel-urls: true |
| 48 |
|
| 49 |
- name: Build and test package |
| 50 |
|
| 51 |
# conda setup requires this special shell |
| 52 |
shell: bash -l {0} |
| 53 |
run: | |
| 54 |
conda-build -c conda -c conda-forge --python "${{ matrix.python-version }}" conda.recipe |
| 55 |
|
| 56 |
# TODO: Re-enable codecov when we figure out how to grab coverage from the conda build |
| 57 |
# environment |
| 58 |
# - name: CodeCov |
| 59 |
# uses: codecov/codecov-action@v1 |
| 60 |
# with: |
| 61 |
# file: ./coverage.xml |
| 62 |
# flags: unittests |
| 63 |
# name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} |