@@ -28,49 +28,23 @@ jobs:
2828 PYTENSOR_FLAGS : gcc__cxxflags='-march=native'
2929 defaults :
3030 run :
31- shell : bash -l {0}
31+ shell : bash -leo pipefail {0}
3232 steps :
3333 - uses : actions/checkout@v4
34- - name : Cache conda
35- uses : actions/cache@v4
36- env :
37- # Increase this value to reset cache if environment-test.yml has not changed
38- CACHE_NUMBER : 0
34+ - uses : mamba-org/setup-micromamba@v1
3935 with :
40- path : ~/conda_pkgs_dir
41- key : ${{ runner.os }}-py${{matrix.python-version}}-conda-${{ env.CACHE_NUMBER }}-${{
42- hashFiles('conda-envs/environment-test.yml') }}
43- - name : Cache multiple paths
44- uses : actions/cache@v4
45- env :
46- # Increase this value to reset cache if requirements.txt has not changed
47- CACHE_NUMBER : 0
48- with :
49- path : |
50- ~/.cache/pip
51- $RUNNER_TOOL_CACHE/Python/*
52- ~\AppData\Local\pip\Cache
53- key : ${{ runner.os }}-build-${{ matrix.python-version }}-${{
54- hashFiles('requirements.txt') }}
55- - uses : conda-incubator/setup-miniconda@v3
56- with :
57- miniforge-variant : Mambaforge
58- miniforge-version : latest
59- mamba-version : " *"
60- activate-environment : pymc-experimental-test
61- channel-priority : strict
6236 environment-file : conda-envs/environment-test.yml
63- python-version : ${{matrix.python-version}}
64- use-mamba : true
65- use-only-tar-bz2 : true # IMPORTANT: This needs to be set for caching to work properly!
37+ create-args : >-
38+ python=${{matrix.python-version}}
39+ environment-name : pymc-experimental-test
40+ init-shell : bash
41+ cache-environment : true
6642 - name : Install pymc-experimental
6743 run : |
68- conda activate pymc-experimental-test
6944 pip install -e .
7045 python --version
7146 - name : Run tests
7247 run : |
73- conda activate pymc-experimental-test
7448 python -m pytest -vv --cov=pymc_experimental --cov-append --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
7549 - name : Upload coverage to Codecov
7650 uses : codecov/codecov-action@v2
@@ -92,51 +66,25 @@ jobs:
9266 PYTENSOR_FLAGS : gcc__cxxflags='-march=core2'
9367 defaults :
9468 run :
95- shell : cmd
69+ shell : cmd /C call {0}
9670 steps :
9771 - uses : actions/checkout@v4
98- - name : Cache conda
99- uses : actions/cache@v4
100- env :
101- # Increase this value to reset cache if conda-envs/windows-environment-test.yml has not changed
102- CACHE_NUMBER : 0
103- with :
104- path : ~/conda_pkgs_dir
105- key : ${{ runner.os }}-py${{matrix.python-version}}-conda-${{ env.CACHE_NUMBER }}-${{
106- hashFiles('conda-envs/windows-environment-test.yml') }}
107- - name : Cache multiple paths
108- uses : actions/cache@v4
109- env :
110- # Increase this value to reset cache if requirements.txt has not changed
111- CACHE_NUMBER : 0
112- with :
113- path : |
114- ~/.cache/pip
115- $RUNNER_TOOL_CACHE/Python/*
116- ~\AppData\Local\pip\Cache
117- key : ${{ runner.os }}-build-${{ matrix.python-version }}-${{
118- hashFiles('requirements.txt') }}
119- - uses : conda-incubator/setup-miniconda@v3
72+ - uses : mamba-org/setup-micromamba@v1
12073 with :
121- miniforge-variant : Mambaforge
122- miniforge-version : latest
123- mamba-version : " *"
124- activate-environment : pymc-experimental-test
125- channel-priority : strict
12674 environment-file : conda-envs/windows-environment-test.yml
127- python-version : ${{matrix.python-version}}
128- use-mamba : true
129- use-only-tar-bz2 : true # IMPORTANT: This needs to be set for caching to work properly!
75+ create-args : >-
76+ python=${{matrix.python-version}}
77+ environment-name : pymc-experimental-test
78+ init-shell : cmd.exe
79+ cache-environment : true
13080 - name : Install pymc-experimental
13181 run : |
132- conda activate pymc-experimental-test
13382 pip install -e .
13483 python --version
13584 - name : Run tests
13685 # This job uses a cmd shell, therefore the environment variable syntax is different!
13786 # The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682).
13887 run : >-
139- conda activate pymc-experimental-test &&
14088 python -m pytest -vv --cov=pymc_experimental --cov-append --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
14189 - name : Upload coverage to Codecov
14290 uses : codecov/codecov-action@v2
0 commit comments