Skip to content

Commit 820d6f5

Browse files
committed
Update CI with caching
1 parent 049e05a commit 820d6f5

File tree

3 files changed

+31
-13
lines changed

3 files changed

+31
-13
lines changed

.github/workflows/lint.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,20 @@ jobs:
2323
run: |
2424
pip install poetry
2525
26-
- name: Configure Poetry
27-
run: |
28-
poetry config virtualenvs.create false
26+
- name: Cache Poetry virtualenv and dependencies
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
~/.cache/pypoetry
31+
~/.cache/pip
32+
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
33+
restore-keys: |
34+
poetry-${{ runner.os }}-
2935
3036
- name: Install dependencies
3137
run: |
3238
make install
3339
3440
- name: Run linting checks
3541
run: |
36-
make check-pylint
42+
make check-pylint

.github/workflows/pre-commit.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,20 @@ jobs:
2323
run: |
2424
pip install poetry
2525
26-
- name: Configure Poetry
27-
run: |
28-
poetry config virtualenvs.create false
29-
26+
- name: Cache Poetry virtualenv and dependencies
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
~/.cache/pypoetry
31+
~/.cache/pip
32+
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
33+
restore-keys: |
34+
poetry-${{ runner.os }}-
35+
3036
- name: Install dependencies
3137
run: |
3238
make install
3339
3440
- name: Run Pre-commit checks
3541
run: |
36-
make precommit
42+
make precommit

.github/workflows/test.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,20 @@ jobs:
2323
run: |
2424
pip install poetry
2525
26-
- name: Configure Poetry
27-
run: |
28-
poetry config virtualenvs.create false
26+
- name: Cache Poetry virtualenv and dependencies
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
~/.cache/pypoetry
31+
~/.cache/pip
32+
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
33+
restore-keys: |
34+
poetry-${{ runner.os }}-
2935
3036
- name: Install dependencies
3137
run: |
3238
make install
3339
3440
- name: Run tests
3541
run: |
36-
make test
42+
make test

0 commit comments

Comments
 (0)