Skip to content

Commit 7de83a3

Browse files
DanielNoordcdce8p
andauthored
Enable 3.11 in the CI (#1517)
Co-authored-by: Marc Mueller <[email protected]>
1 parent 3eae00c commit 7de83a3

File tree

2 files changed

+52
-2
lines changed

2 files changed

+52
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,61 @@ jobs:
130130
name: coverage-${{ matrix.python-version }}
131131
path: .coverage
132132

133+
tests-linux-dev:
134+
name: tests / run / ${{ matrix.python-version }} / Linux
135+
runs-on: ubuntu-latest
136+
timeout-minutes: 20
137+
strategy:
138+
matrix:
139+
python-version: ["3.11-dev"]
140+
steps:
141+
- name: Check out code from GitHub
142+
uses: actions/[email protected]
143+
- name: Set up Python ${{ matrix.python-version }}
144+
id: python
145+
uses: actions/[email protected]
146+
with:
147+
python-version: ${{ matrix.python-version }}
148+
- name: Generate partial Python venv restore key
149+
id: generate-python-key
150+
run: >-
151+
echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{
152+
hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt',
153+
'requirements_test_brain.txt') }}"
154+
- name: Restore Python virtual environment
155+
id: cache-venv
156+
uses: actions/[email protected]
157+
with:
158+
path: venv
159+
key: >-
160+
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
161+
steps.generate-python-key.outputs.key }}
162+
restore-keys: |
163+
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}-
164+
- name: Create Python virtual environment
165+
if: steps.cache-venv.outputs.cache-hit != 'true'
166+
run: |
167+
python -m venv venv
168+
. venv/bin/activate
169+
python -m pip install -U pip setuptools wheel
170+
pip install -U -r requirements_test.txt -r requirements_test_brain.txt
171+
pip install -e .
172+
- name: Run pytest
173+
run: |
174+
. venv/bin/activate
175+
pytest --cov --cov-report= tests/
176+
- name: Upload coverage artifact
177+
uses: actions/[email protected]
178+
with:
179+
name: coverage-${{ matrix.python-version }}
180+
path: .coverage
181+
133182
coverage:
134183
name: tests / process / coverage
135184
runs-on: ubuntu-latest
136185
timeout-minutes: 5
137-
needs: ["tests-linux"]
186+
needs: ["tests-linux", "tests-linux-dev"]
187+
if: always() # remove together with tests-linux-dev
138188
strategy:
139189
matrix:
140190
python-version: [3.8]

requirements_test_brain.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
attrs
22
types-attrs
33
nose
4-
numpy>=1.17.0
4+
numpy>=1.17.0; python_version<"3.11"
55
python-dateutil
66
PyQt6
77
types-python-dateutil

0 commit comments

Comments
 (0)