Skip to content

Commit ca6005c

Browse files
committed
chore: use uv in CI
1 parent 4957667 commit ca6005c

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@ jobs:
1919
- uses: actions/setup-python@v5
2020
with:
2121
python-version: 3.9
22+
- uses: astral-sh/setup-uv@v6
23+
with:
24+
version: "latest"
2225
- name: Install Dependencies and library
2326
shell: bash
24-
run: |
25-
set -ux
26-
python -m pip install --upgrade pip
27-
pip install -e ".[dev]"
27+
run: uv pip install --system ".[dev]"
2828

2929
- name: Run formatter
3030
shell: bash
3131
run: ruff format taskiq_faststream
3232

33-
- name: Run mypy
33+
- name: Run ruff
3434
shell: bash
35-
run: mypy taskiq_faststream
35+
run: ruff check taskiq_faststream
3636

37-
- name: Run ruff
37+
- name: Run mypy
3838
shell: bash
39-
run: ruff taskiq_faststream
39+
run: mypy taskiq_faststream
4040

4141
test:
4242
if: github.event.pull_request.draft == false
@@ -52,14 +52,17 @@ jobs:
5252
uses: actions/setup-python@v5
5353
with:
5454
python-version: ${{ matrix.python-version }}
55+
- uses: astral-sh/setup-uv@v6
56+
with:
57+
version: "latest"
5558
- uses: actions/cache@v4
5659
id: cache
5760
with:
5861
path: ${{ env.pythonLocation }}
5962
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test-v03
6063
- name: Install Dependencies
6164
if: steps.cache.outputs.cache-hit != 'true'
62-
run: pip install -e .[test]
65+
run: uv pip install --system ".[test]"
6366
- run: mkdir coverage
6467
- name: Test
6568
run: bash scripts/test.sh
@@ -83,7 +86,11 @@ jobs:
8386

8487
- uses: actions/setup-python@v5
8588
with:
86-
python-version: '3.8'
89+
python-version: 3.9
90+
91+
- uses: astral-sh/setup-uv@v6
92+
with:
93+
version: "latest"
8794

8895
- name: Get coverage files
8996
uses: actions/download-artifact@v4
@@ -92,7 +99,7 @@ jobs:
9299
path: coverage
93100
merge-multiple: true
94101

95-
- run: pip install coverage[toml]
102+
- run: uv pip install --system "coverage[toml]"
96103

97104
- run: ls -la coverage
98105
- run: coverage combine coverage

scripts/lint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22

3-
echo "Running ruff..."
4-
ruff check taskiq_faststream tests --fix
5-
63
echo "Running ruff formatter..."
74
ruff format taskiq_faststream tests
85

6+
echo "Running ruff..."
7+
ruff check taskiq_faststream tests --fix
8+
99
echo "Running mypy..."
1010
mypy taskiq_faststream

0 commit comments

Comments
 (0)