10
10
- " tests/**"
11
11
- " setup.py"
12
12
- " pyproject.toml"
13
- - " buildosx"
14
13
- " conda-envs/**"
15
14
- " codecov.yml"
16
15
16
+ # Cancels all previous workflow runs for pull requests that have not completed.
17
+ concurrency :
18
+ # The concurrency group contains the workflow name and the branch name for pull requests
19
+ # or the commit hash for any other events.
20
+ group : ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
21
+ cancel-in-progress : true
22
+
17
23
jobs :
18
24
ubuntu :
19
25
strategy :
20
26
matrix :
21
27
os : [ubuntu-latest]
22
- python-version : ["3.10 "]
28
+ python-version : ["3.11 "]
23
29
test-subset :
24
- - tests
30
+ - tests/model
31
+ - tests/statespace/core/test_statespace.py
32
+ - tests/statespace/filters/test_kalman_filter.py
33
+ - tests/statespace --ignore tests/statespace/core/test_statespace.py --ignore tests/statespace/filters/test_kalman_filter.py
34
+ - tests/distributions
35
+ - tests --ignore tests/model --ignore tests/statespace --ignore tests/distributions
25
36
fail-fast : false
26
37
runs-on : ${{ matrix.os }}
27
38
env :
32
43
shell : bash -leo pipefail {0}
33
44
steps :
34
45
- uses : actions/checkout@v4
35
- - uses : mamba-org/setup-micromamba@v1
46
+ - uses : mamba-org/setup-micromamba@v2
36
47
with :
37
48
environment-file : conda-envs/environment-test.yml
38
49
create-args : >-
@@ -42,11 +53,12 @@ jobs:
42
53
cache-environment : true
43
54
- name : Install pymc-extras
44
55
run : |
45
- pip install -e .
56
+ pip install -e ".[dev]"
46
57
python --version
58
+ pip check
47
59
- name : Run tests
48
60
run : |
49
- python -m pytest -vv --cov=pymc_extras --cov-append --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
61
+ python -m pytest --color=yes - vv --cov=pymc_extras --cov-append --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
50
62
- name : Upload coverage to Codecov
51
63
uses : codecov/codecov-action@v2
52
64
with :
59
71
os : [windows-latest]
60
72
python-version : ["3.12"]
61
73
test-subset :
62
- - tests
74
+ - tests/model
75
+ - tests/statespace/core/test_statespace.py
76
+ - tests/statespace/filters/test_kalman_filter.py
77
+ - tests/statespace --ignore tests/statespace/core/test_statespace.py --ignore tests/statespace/filters/test_kalman_filter.py
78
+ - tests/distributions
79
+ - tests --ignore tests/model --ignore tests/statespace --ignore tests/distributions
63
80
fail-fast : false
64
81
runs-on : ${{ matrix.os }}
65
82
env :
@@ -70,27 +87,36 @@ jobs:
70
87
shell : cmd /C call {0}
71
88
steps :
72
89
- uses : actions/checkout@v4
73
- - uses : mamba-org/setup-micromamba@v1
90
+ - uses : mamba-org/setup-micromamba@v2
74
91
with :
75
- environment-file : conda-envs/windows- environment-test.yml
76
- micromamba-version : " 1.5.10-0 " # Until https://github.com/mamba-org/mamba/issues/3467 is not fixed
92
+ environment-file : conda-envs/environment-test.yml
93
+ micromamba-version : " latest "
77
94
create-args : >-
78
95
python=${{matrix.python-version}}
79
96
environment-name : pymc-extras-test
80
97
init-shell : cmd.exe
81
98
cache-environment : true
82
99
- name : Install pymc-extras
83
100
run : |
84
- pip install -e .
101
+ pip install -e ".[dev]"
85
102
python --version
86
103
- name : Run tests
87
104
# This job uses a cmd shell, therefore the environment variable syntax is different!
88
105
# The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682).
89
106
run : >-
90
- python -m pytest -vv --cov=pymc_extras --cov-append --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
107
+ python -m pytest --color=yes - vv --cov=pymc_extras --cov-append --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
91
108
- name : Upload coverage to Codecov
92
109
uses : codecov/codecov-action@v2
93
110
with :
94
111
env_vars : TEST_SUBSET
95
112
name : ${{ matrix.os }}
96
113
fail_ci_if_error : false
114
+
115
+ all_tests :
116
+ if : ${{ always() }}
117
+ runs-on : ubuntu-latest
118
+ needs : [ ubuntu, windows ]
119
+ steps :
120
+ - name : Check all tests pass
121
+ if : ${{ needs.ubuntu.result != 'success' || needs.windows.result != 'success' }}
122
+ run : exit 1
0 commit comments