Skip to content

Commit 6af5104

Browse files
Run only selected tests under float32
Closes #5626
1 parent 0ae774f commit 6af5104

File tree

1 file changed

+70
-4
lines changed

1 file changed

+70
-4
lines changed

.github/workflows/tests.yml

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
strategy:
3434
matrix:
3535
os: [ubuntu-20.04]
36-
floatx: [float32, float64]
36+
floatx: [float64]
3737
test-subset:
3838
- |
3939
pymc/tests/test_util.py
@@ -125,7 +125,7 @@ jobs:
125125
- name: Run tests
126126
run: |
127127
conda activate pymc-test-py37
128-
python -m pytest -vv --cov=pymc --cov-append --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
128+
python -m pytest -vv --cov=pymc --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
129129
- name: Upload coverage to Codecov
130130
uses: codecov/codecov-action@v2
131131
with:
@@ -136,7 +136,7 @@ jobs:
136136
strategy:
137137
matrix:
138138
os: [windows-latest]
139-
floatx: [float32, float64]
139+
floatx: [float64]
140140
test-subset:
141141
- pymc/tests/test_variational_inference.py pymc/tests/test_initial_point.py
142142
- pymc/tests/test_pickling.py pymc/tests/test_profile.py pymc/tests/test_step.py
@@ -195,7 +195,7 @@ jobs:
195195
# The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682).
196196
run: >-
197197
conda activate pymc-test-py38 &&
198-
python -m pytest -vv --cov=pymc --cov-append --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
198+
python -m pytest -vv --cov=pymc --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
199199
- name: Upload coverage to Codecov
200200
uses: codecov/codecov-action@v2
201201
with:
@@ -341,3 +341,69 @@ jobs:
341341
env_vars: TEST_SUBSET
342342
name: JAX tests - ${{ matrix.os }} ${{ matrix.floatx }}
343343
fail_ci_if_error: false
344+
float32:
345+
strategy:
346+
matrix:
347+
os: [windows-latest]
348+
floatx: [float32]
349+
test-subset:
350+
- pymc/tests/test_sampling.py pymc/tests/test_ode.py
351+
fail-fast: false
352+
runs-on: ${{ matrix.os }}
353+
env:
354+
TEST_SUBSET: ${{ matrix.test-subset }}
355+
AESARA_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=core2'
356+
defaults:
357+
run:
358+
shell: cmd
359+
steps:
360+
- uses: actions/checkout@v2
361+
- name: Cache conda
362+
uses: actions/cache@v1
363+
env:
364+
# Increase this value to reset cache if conda-envs/environment-test-py38.yml has not changed
365+
CACHE_NUMBER: 0
366+
with:
367+
path: ~/conda_pkgs_dir
368+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
369+
hashFiles('conda-envs/windows-environment-test-py38.yml') }}
370+
- name: Cache multiple paths
371+
uses: actions/cache@v2
372+
env:
373+
# Increase this value to reset cache if requirements.txt has not changed
374+
CACHE_NUMBER: 0
375+
with:
376+
path: |
377+
~/.cache/pip
378+
$RUNNER_TOOL_CACHE/Python/*
379+
~\AppData\Local\pip\Cache
380+
key: ${{ runner.os }}-build-${{ matrix.python-version }}-${{
381+
hashFiles('requirements.txt') }}
382+
- uses: conda-incubator/setup-miniconda@v2
383+
with:
384+
miniforge-variant: Mambaforge
385+
miniforge-version: latest
386+
mamba-version: "*"
387+
activate-environment: pymc-test-py38
388+
channel-priority: strict
389+
environment-file: conda-envs/windows-environment-test-py38.yml
390+
use-mamba: true
391+
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
392+
- name: Install-pymc
393+
run: |
394+
conda activate pymc-test-py38
395+
pip install -e .
396+
pip install --pre -U polyagamma
397+
python --version
398+
- name: Run tests
399+
# This job uses a cmd shell, therefore the environment variable syntax is different!
400+
# The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682).
401+
run: >-
402+
conda activate pymc-test-py38 &&
403+
python -m pytest -vv --cov=pymc --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
404+
- name: Upload coverage to Codecov
405+
uses: codecov/codecov-action@v2
406+
with:
407+
env_vars: TEST_SUBSET
408+
name: ${{ matrix.os }} ${{ matrix.floatx }}
409+
fail_ci_if_error: false

0 commit comments

Comments
 (0)