|
| 1 | +name: pytest |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: [master] |
| 7 | + |
| 8 | +jobs: |
| 9 | + pytest: |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + python-version: ["3.6"] |
| 13 | + os: [ubuntu-18.04] |
| 14 | + floatx: [float32, float64] |
| 15 | + test-subset: |
| 16 | + - | |
| 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 |
| 26 | + --ignore=pymc3/tests/test_dist_math.py |
| 27 | + --ignore=pymc3/tests/test_distribution_defaults.py |
| 28 | + --ignore=pymc3/tests/test_distributions_timeseries.py |
| 29 | + --ignore=pymc3/tests/test_random.py |
| 30 | + --ignore=pymc3/tests/test_gp.py |
| 31 | + --ignore=pymc3/tests/test_shape_handling |
| 32 | + --ignore=pymc3/tests/test_quadpotential.py |
| 33 | + - | |
| 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 |
| 39 | + pymc3/tests/test_dist_math.py |
| 40 | + pymc3/tests/test_distribution_defaults.py |
| 41 | + pymc3/tests/test_distributions_timeseries.py |
| 42 | + pymc3/tests/test_random.py |
| 43 | + - | |
| 44 | + pymc3/tests/test_examples.py |
| 45 | + pymc3/tests/test_posteriors.py |
| 46 | + pymc3/tests/test_gp.py |
| 47 | + pymc3/tests/test_quadpotential.py |
| 48 | + - | |
| 49 | + pymc3/tests/test_variational_inference.py |
| 50 | + pymc3/tests/test_updates.py |
| 51 | + pymc3/tests/test_shape_handling.py |
| 52 | + runs-on: ${{ matrix.os }} |
| 53 | + env: |
| 54 | + TEST_SUBSET: ${{ matrix.test-subset }} |
| 55 | + THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc.cxxflags='-march=native' |
| 56 | + defaults: |
| 57 | + run: |
| 58 | + shell: bash -l {0} |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@v2 |
| 61 | + - name: Cache conda |
| 62 | + uses: actions/cache@v1 |
| 63 | + env: |
| 64 | + # Increase this value to reset cache if environment-dev.yml has not changed |
| 65 | + CACHE_NUMBER: 0 |
| 66 | + with: |
| 67 | + path: ~/conda_pkgs_dir |
| 68 | + key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ |
| 69 | + hashFiles('environment-dev.yml') }} |
| 70 | + - uses: conda-incubator/setup-miniconda@v2 |
| 71 | + with: |
| 72 | + activate-environment: testenv |
| 73 | + channel-priority: strict |
| 74 | + environment-file: environment-dev.yml |
| 75 | + use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! |
| 76 | + - run: | |
| 77 | + conda activate testenv |
| 78 | + python -m pytest -v --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET |
| 79 | + - name: Upload coverage to Codecov |
| 80 | + uses: codecov/codecov-action@v1 |
| 81 | + with: |
| 82 | + env_vars: OS,PYTHON |
| 83 | + name: codecov-umbrella |
| 84 | + fail_ci_if_error: false |
0 commit comments