-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (65 loc) · 1.9 KB
/
ci.yaml
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
name: CI
env:
micromamba_version: 2.0.0
on:
push:
pull_request:
workflow_dispatch: # allows you to trigger manually
jobs:
pre-job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
skip_after_successful_duplicate: 'false'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
paths_ignore: '["**/docs/**"]'
build:
needs: pre-job
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
name: python-${{ matrix.python-version }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v2
with:
environment-name: act-test-data-dev
environment-file: ci/environment.yml
extra-specs: |
python=${{ matrix.python-version }}
init-shell: >-
bash
post-cleanup: "all"
- name: Fetch all history for all tags and branches
run: |
git fetch --prune --unshallow
- name: Set up conda environment
run: |
python -m pip install -e .
conda list
- name: Run Tests
run: |
python -m pytest --cov=./ --cov-report=xml --verbose
- name: Upload code coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false