@@ -28,49 +28,23 @@ jobs:
28
28
PYTENSOR_FLAGS : gcc__cxxflags='-march=native'
29
29
defaults :
30
30
run :
31
- shell : bash -l {0}
31
+ shell : bash -leo pipefail {0}
32
32
steps :
33
33
- 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
39
35
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
62
36
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
66
42
- name : Install pymc-experimental
67
43
run : |
68
- conda activate pymc-experimental-test
69
44
pip install -e .
70
45
python --version
71
46
- name : Run tests
72
47
run : |
73
- conda activate pymc-experimental-test
74
48
python -m pytest -vv --cov=pymc_experimental --cov-append --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
75
49
- name : Upload coverage to Codecov
76
50
uses : codecov/codecov-action@v2
@@ -92,51 +66,25 @@ jobs:
92
66
PYTENSOR_FLAGS : gcc__cxxflags='-march=core2'
93
67
defaults :
94
68
run :
95
- shell : cmd
69
+ shell : cmd /C call {0}
96
70
steps :
97
71
- 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
120
73
with :
121
- miniforge-variant : Mambaforge
122
- miniforge-version : latest
123
- mamba-version : " *"
124
- activate-environment : pymc-experimental-test
125
- channel-priority : strict
126
74
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
130
80
- name : Install pymc-experimental
131
81
run : |
132
- conda activate pymc-experimental-test
133
82
pip install -e .
134
83
python --version
135
84
- name : Run tests
136
85
# This job uses a cmd shell, therefore the environment variable syntax is different!
137
86
# The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682).
138
87
run : >-
139
- conda activate pymc-experimental-test &&
140
88
python -m pytest -vv --cov=pymc_experimental --cov-append --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
141
89
- name : Upload coverage to Codecov
142
90
uses : codecov/codecov-action@v2
0 commit comments