Skip to content

Commit 8622bd2

Browse files
committed
run checks in parallel
1 parent 8455a09 commit 8622bd2

1 file changed

Lines changed: 45 additions & 6 deletions

File tree

.github/workflows/check.yml

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,53 @@
11
on: [ workflow_dispatch, push ]
2+
23
jobs:
3-
check:
4+
setup:
45
runs-on: ubuntu-latest
56
steps:
6-
- uses: actions/checkout@v2
7-
- uses: actions/setup-python@v2
7+
- uses: actions/checkout@v4
8+
- uses: actions/setup-python@v5
89
with:
910
python-version: '3.13'
1011
- uses: snok/install-poetry@v1
12+
- name: Cache poetry dependencies
13+
uses: actions/cache@v4
14+
with:
15+
path: |
16+
~/.cache/pypoetry
17+
.venv
18+
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
1119
- run: make install
12-
- run: make lint
13-
- run: make types
14-
- run: make test
20+
- name: Create marker file
21+
run: echo "setup-complete" > setup-complete.txt
22+
- name: Upload marker file
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: setup-marker
26+
path: setup-complete.txt
27+
retention-days: 1
28+
29+
check:
30+
needs: setup
31+
runs-on: ubuntu-latest
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
check: [ lint, types, test ]
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: actions/setup-python@v5
39+
with:
40+
python-version: '3.13'
41+
- uses: snok/install-poetry@v1
42+
- name: Download marker file
43+
uses: actions/download-artifact@v4
44+
with:
45+
name: setup-marker
46+
- name: Restore cache
47+
uses: actions/cache@v4
48+
with:
49+
path: |
50+
~/.cache/pypoetry
51+
.venv
52+
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
53+
- run: make ${{ matrix.check }}

0 commit comments

Comments
 (0)