-
Notifications
You must be signed in to change notification settings - Fork 13
185 lines (169 loc) · 4.3 KB
/
test_tox.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
on:
workflow_dispatch:
push:
paths:
- .github/workflows/tox.yml
- .github/workflows/test_tox.yml
pull_request:
paths:
- .github/workflows/tox.yml
- .github/workflows/test_tox.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test_pyos:
uses: ./.github/workflows/tox.yml
with:
envs: |
- linux: py312-inputs-linux
- macos: py311-inputs-macos
- windows: py310-inputs-windows
toxargs: '-v'
runs-on: windows-2019
- linux: py312-inputs-conda
- macos: py312-inputs-conda
conda: false
posargs: not
- windows: py312-inputs-con_da
conda: true
pytest: false
test_global_override:
uses: ./.github/workflows/tox.yml
with:
conda: 'true'
runs-on: |
linux: ubuntu-20.04
macos: macos-11
envs: |
# conda present in toxenv
- linux: py311-inputs-conda
- linux: py311-inputs-conda
conda: false
posargs: not
# conda not present in toxenv
- linux: py311-inputs-con_da
runs-on: ubuntu-latest
- linux: py311-inputs-con_da
conda: auto
posargs: not
timeout-minutes: 5
pytest: false
timeout-minutes: 2
test_default_python:
uses: ./.github/workflows/tox.yml
with:
default_python: '3.9'
envs: |
- linux: default_python
posargs: '9'
- linux: default_python
default_python: '3.12'
posargs: '12'
- linux: py313-python_version
python-version: '3.13-dev'
posargs: 'CPython'
- linux: pypy310-python_version
python-version: 'pypy-3.10'
posargs: 'PyPy'
pytest: false
test_libraries:
uses: ./.github/workflows/tox.yml
with:
libraries: |
apt:
- rolldice
brew:
- openjpeg
envs: |
- linux: libraries
posargs: 'rolldice -v'
- macos: libraries
posargs: 'which opj_compress'
- linux: libraries
posargs: 'bcal -h'
libraries:
apt:
- bcal
- windows: libraries
posargs: 'dot -V'
libraries:
apt:
- shouldnotinstall12345
choco:
- graphviz
# test no libraries override
- linux: libraries
libraries: ''
posargs: 'rolldice -v && exit 1 || exit 0'
pytest: false
test_venv:
uses: ./.github/workflows/tox.yml
with:
envs: |
- linux: pep8
name: style_check
pytest: false
- linux: py312
- macos: py311
- windows: py310
test_conda:
uses: ./.github/workflows/tox.yml
with:
envs: |
- linux: py312-conda
- macos: py311-conda
- windows: py310-conda
test_setenv:
uses: ./.github/workflows/tox.yml
with:
setenv: |
MY_VAR: global_value
envs: |
- linux: setenv-local
setenv: |
MY_VAR: local_value
- macos: setenv-global
test_cache_setup:
uses: ./.github/workflows/tox.yml
with:
cache-path: a/
cache-key: cache-${{ github.run_id }}
envs: |
- linux: cache-setup
test_cache_verify:
needs: [test_cache_setup]
uses: ./.github/workflows/tox.yml
with:
envs: |
- linux: cache-verify
cache-path: |
a/
cache-key: cache-${{ github.run_id }}
test_artifact_upload:
uses: ./.github/workflows/tox.yml
with:
envs: |
- linux: artifact-upload
pytest: false
artifact-path: test.txt
test_artifact_download:
needs: [test_artifact_upload]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: artifact-upload-(ubuntu-latest)
path: .
- run: python -c "assert open('test.txt').read().strip() == 'hello world'"
test_pytest_args:
uses: ./.github/workflows/tox.yml
with:
envs: |
- linux: py312-linux
pytest-results-summary: true
test_prereleases:
uses: ./.github/workflows/tox.yml
with:
envs: |
- linux: py312