Skip to content

Commit 0ac020c

Browse files
authored
Split testing workflow in two stages (#30)
1 parent b22513d commit 0ac020c

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,34 @@ permissions:
1010
contents: read
1111

1212
jobs:
13+
pre-commit:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup micromamba
19+
uses: mamba-org/setup-micromamba@v1
20+
with:
21+
environment-file: environment-cpu.yml
22+
environment-name: skala
23+
cache-environment: true
24+
cache-downloads: true
25+
26+
- name: Install package in development mode
27+
run: |
28+
pip install -e . --no-deps
29+
shell: micromamba-shell {0}
30+
31+
- name: Run pre-commit hooks
32+
run: |
33+
pre-commit install
34+
pre-commit run --all-files
35+
shell: micromamba-shell {0}
36+
1337
test:
1438
runs-on: ubuntu-latest
39+
needs:
40+
- pre-commit
1541
strategy:
1642
fail-fast: false
1743
matrix:
@@ -41,17 +67,6 @@ jobs:
4167
pip install -e . --no-deps
4268
shell: micromamba-shell {0}
4369

44-
- name: Check environment consistency
45-
run: |
46-
pip check
47-
shell: micromamba-shell {0}
48-
49-
- name: Run pre-commit hooks
50-
run: |
51-
pre-commit install
52-
pre-commit run --all-files
53-
shell: micromamba-shell {0}
54-
5570
- name: Run tests with coverage
5671
run: >-
5772
pytest

0 commit comments

Comments
 (0)