Skip to content

Commit

Permalink
CI test Arviz compat (#4258)
Browse files Browse the repository at this point in the history
* put test_distributions in separate job

* 🎨 sort

* add arviz compat job

* update after_n_builds
  • Loading branch information
MarcoGorelli authored Nov 26, 2020
1 parent 2723b6c commit a6295a3
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
codecov:
require_ci_to_pass: no
notify:
after_n_builds: 7
after_n_builds: 9

coverage:
precision: 2
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/arviz_compat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: arviz-compatibility

on:
pull_request:
push:
branches: [master]

jobs:
pytest:
strategy:
matrix:
python-version: ["3.8"]
os: [ubuntu-18.04]
floatx: [float64]
test-subset:
- pymc3/tests/test_sampling.py
runs-on: ${{ matrix.os }}
env:
TEST_SUBSET: ${{ matrix.test-subset }}
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc.cxxflags='-march=native'
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v1
env:
# Increase this value to reset cache if environment-dev.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('environment-dev.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: testenv
channel-priority: strict
environment-file: environment-dev.yml
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- run: |
conda activate testenv
conda remove arviz -y
pip install git+git://github.com/arviz-devs/arviz.git
python -m pytest -v --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET -n auto
41 changes: 22 additions & 19 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,44 @@ jobs:
floatx: [float32, float64]
test-subset:
- |
--ignore=pymc3/tests/test_examples.py
--ignore=pymc3/tests/test_distributions_random.py
--ignore=pymc3/tests/test_variational_inference.py
--ignore=pymc3/tests/test_shared.py
--ignore=pymc3/tests/test_smc.py
--ignore=pymc3/tests/test_updates.py
--ignore=pymc3/tests/test_posteriors.py
--ignore=pymc3/tests/test_sampling.py
--ignore=pymc3/tests/test_parallel_sampling.py
--ignore=pymc3/tests/test_dist_math.py
--ignore=pymc3/tests/test_distribution_defaults.py
--ignore=pymc3/tests/test_distributions.py
--ignore=pymc3/tests/test_distributions_random.py
--ignore=pymc3/tests/test_distributions_timeseries.py
--ignore=pymc3/tests/test_random.py
--ignore=pymc3/tests/test_examples.py
--ignore=pymc3/tests/test_gp.py
--ignore=pymc3/tests/test_shape_handling
--ignore=pymc3/tests/test_parallel_sampling.py
--ignore=pymc3/tests/test_posteriors.py
--ignore=pymc3/tests/test_quadpotential.py
--ignore=pymc3/tests/test_random.py
--ignore=pymc3/tests/test_sampling.py
--ignore=pymc3/tests/test_shape_handling
--ignore=pymc3/tests/test_shared.py
--ignore=pymc3/tests/test_smc.py
--ignore=pymc3/tests/test_updates.py
--ignore=pymc3/tests/test_variational_inference.py
- |
pymc3/tests/test_distributions_random.py
pymc3/tests/test_shared.py
pymc3/tests/test_smc.py
pymc3/tests/test_sampling.py
pymc3/tests/test_parallel_sampling.py
pymc3/tests/test_dist_math.py
pymc3/tests/test_distribution_defaults.py
pymc3/tests/test_distributions_random.py
pymc3/tests/test_distributions_timeseries.py
pymc3/tests/test_parallel_sampling.py
pymc3/tests/test_random.py
pymc3/tests/test_sampling.py
pymc3/tests/test_shared.py
pymc3/tests/test_smc.py
- |
pymc3/tests/test_examples.py
pymc3/tests/test_posteriors.py
pymc3/tests/test_gp.py
pymc3/tests/test_posteriors.py
pymc3/tests/test_quadpotential.py
- |
pymc3/tests/test_variational_inference.py
pymc3/tests/test_updates.py
pymc3/tests/test_shape_handling.py
pymc3/tests/test_updates.py
pymc3/tests/test_variational_inference.py
- |
pymc3/tests/test_distributions.py
runs-on: ${{ matrix.os }}
env:
TEST_SUBSET: ${{ matrix.test-subset }}
Expand Down

0 comments on commit a6295a3

Please sign in to comment.