Skip to content

Commit 41e3b50

Browse files
committed
chore: use cache in CI
1 parent ca6005c commit 41e3b50

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,26 @@ jobs:
1919
- uses: actions/setup-python@v5
2020
with:
2121
python-version: 3.9
22+
23+
- uses: actions/cache@v4
24+
id: cache
25+
with:
26+
path: ${{ env.pythonLocation }}
27+
key: ${{ runner.os }}-static-analysis-${{ hashFiles('pyproject.toml') }}-test-v03
2228
- uses: astral-sh/setup-uv@v6
29+
if: steps.cache.outputs.cache-hit != 'true'
2330
with:
2431
version: "latest"
25-
- name: Install Dependencies and library
26-
shell: bash
32+
- name: Install Dependencies
33+
if: steps.cache.outputs.cache-hit != 'true'
2734
run: uv pip install --system ".[dev]"
2835

2936
- name: Run formatter
3037
shell: bash
3138
run: ruff format taskiq_faststream
32-
3339
- name: Run ruff
3440
shell: bash
3541
run: ruff check taskiq_faststream
36-
3742
- name: Run mypy
3843
shell: bash
3944
run: mypy taskiq_faststream
@@ -52,17 +57,20 @@ jobs:
5257
uses: actions/setup-python@v5
5358
with:
5459
python-version: ${{ matrix.python-version }}
55-
- uses: astral-sh/setup-uv@v6
56-
with:
57-
version: "latest"
60+
5861
- uses: actions/cache@v4
5962
id: cache
6063
with:
6164
path: ${{ env.pythonLocation }}
6265
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test-v03
66+
- uses: astral-sh/setup-uv@v6
67+
if: steps.cache.outputs.cache-hit != 'true'
68+
with:
69+
version: "latest"
6370
- name: Install Dependencies
6471
if: steps.cache.outputs.cache-hit != 'true'
6572
run: uv pip install --system ".[test]"
73+
6674
- run: mkdir coverage
6775
- name: Test
6876
run: bash scripts/test.sh

0 commit comments

Comments
 (0)