Skip to content

Commit a6295a3

Browse files
authored
CI test Arviz compat (#4258)
* put test_distributions in separate job * 🎨 sort * add arviz compat job * update after_n_builds
1 parent 2723b6c commit a6295a3

File tree

3 files changed

+68
-20
lines changed

3 files changed

+68
-20
lines changed

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
codecov:
22
require_ci_to_pass: no
33
notify:
4-
after_n_builds: 7
4+
after_n_builds: 9
55

66
coverage:
77
precision: 2

.github/workflows/arviz_compat.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: arviz-compatibility
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
pytest:
10+
strategy:
11+
matrix:
12+
python-version: ["3.8"]
13+
os: [ubuntu-18.04]
14+
floatx: [float64]
15+
test-subset:
16+
- pymc3/tests/test_sampling.py
17+
runs-on: ${{ matrix.os }}
18+
env:
19+
TEST_SUBSET: ${{ matrix.test-subset }}
20+
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc.cxxflags='-march=native'
21+
defaults:
22+
run:
23+
shell: bash -l {0}
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Cache conda
27+
uses: actions/cache@v1
28+
env:
29+
# Increase this value to reset cache if environment-dev.yml has not changed
30+
CACHE_NUMBER: 0
31+
with:
32+
path: ~/conda_pkgs_dir
33+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
34+
hashFiles('environment-dev.yml') }}
35+
- uses: conda-incubator/setup-miniconda@v2
36+
with:
37+
activate-environment: testenv
38+
channel-priority: strict
39+
environment-file: environment-dev.yml
40+
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
41+
- run: |
42+
conda activate testenv
43+
conda remove arviz -y
44+
pip install git+git://github.com/arviz-devs/arviz.git
45+
python -m pytest -v --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET -n auto

.github/workflows/pytest.yml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,44 @@ jobs:
1414
floatx: [float32, float64]
1515
test-subset:
1616
- |
17-
--ignore=pymc3/tests/test_examples.py
18-
--ignore=pymc3/tests/test_distributions_random.py
19-
--ignore=pymc3/tests/test_variational_inference.py
20-
--ignore=pymc3/tests/test_shared.py
21-
--ignore=pymc3/tests/test_smc.py
22-
--ignore=pymc3/tests/test_updates.py
23-
--ignore=pymc3/tests/test_posteriors.py
24-
--ignore=pymc3/tests/test_sampling.py
25-
--ignore=pymc3/tests/test_parallel_sampling.py
2617
--ignore=pymc3/tests/test_dist_math.py
2718
--ignore=pymc3/tests/test_distribution_defaults.py
19+
--ignore=pymc3/tests/test_distributions.py
20+
--ignore=pymc3/tests/test_distributions_random.py
2821
--ignore=pymc3/tests/test_distributions_timeseries.py
29-
--ignore=pymc3/tests/test_random.py
22+
--ignore=pymc3/tests/test_examples.py
3023
--ignore=pymc3/tests/test_gp.py
31-
--ignore=pymc3/tests/test_shape_handling
24+
--ignore=pymc3/tests/test_parallel_sampling.py
25+
--ignore=pymc3/tests/test_posteriors.py
3226
--ignore=pymc3/tests/test_quadpotential.py
27+
--ignore=pymc3/tests/test_random.py
28+
--ignore=pymc3/tests/test_sampling.py
29+
--ignore=pymc3/tests/test_shape_handling
30+
--ignore=pymc3/tests/test_shared.py
31+
--ignore=pymc3/tests/test_smc.py
32+
--ignore=pymc3/tests/test_updates.py
33+
--ignore=pymc3/tests/test_variational_inference.py
3334
- |
34-
pymc3/tests/test_distributions_random.py
35-
pymc3/tests/test_shared.py
36-
pymc3/tests/test_smc.py
37-
pymc3/tests/test_sampling.py
38-
pymc3/tests/test_parallel_sampling.py
3935
pymc3/tests/test_dist_math.py
4036
pymc3/tests/test_distribution_defaults.py
37+
pymc3/tests/test_distributions_random.py
4138
pymc3/tests/test_distributions_timeseries.py
39+
pymc3/tests/test_parallel_sampling.py
4240
pymc3/tests/test_random.py
41+
pymc3/tests/test_sampling.py
42+
pymc3/tests/test_shared.py
43+
pymc3/tests/test_smc.py
4344
- |
4445
pymc3/tests/test_examples.py
45-
pymc3/tests/test_posteriors.py
4646
pymc3/tests/test_gp.py
47+
pymc3/tests/test_posteriors.py
4748
pymc3/tests/test_quadpotential.py
4849
- |
49-
pymc3/tests/test_variational_inference.py
50-
pymc3/tests/test_updates.py
5150
pymc3/tests/test_shape_handling.py
51+
pymc3/tests/test_updates.py
52+
pymc3/tests/test_variational_inference.py
53+
- |
54+
pymc3/tests/test_distributions.py
5255
runs-on: ${{ matrix.os }}
5356
env:
5457
TEST_SUBSET: ${{ matrix.test-subset }}

0 commit comments

Comments
 (0)