Skip to content

Commit 2a455c4

Browse files
committed
fix: Use uv in CI workflow
- Replace pip with uv for much faster CI - Use uv sync to install all dependencies - Use uv build instead of python -m build - Use astral-sh/setup-uv@v3 action - This should fix CI failures and make it faster
1 parent 97ad45d commit 2a455c4

1 file changed

Lines changed: 15 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ jobs:
2020
with:
2121
python-version: '3.12'
2222

23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v3
25+
2326
- name: Install dependencies
24-
run: |
25-
python -m pip install --upgrade pip
26-
pip install ruff mypy
27-
pip install -r requirements.txt
27+
run: uv sync
2828

2929
- name: Run Ruff
30-
run: ruff check src/
30+
run: uv run ruff check src/
3131

3232
- name: Run MyPy
33-
run: mypy src/ --ignore-missing-imports
33+
run: uv run mypy src/youtrack_rocket_mcp --ignore-missing-imports
3434

3535
test:
3636
name: Test Python ${{ matrix.python-version }}
@@ -47,15 +47,15 @@ jobs:
4747
with:
4848
python-version: ${{ matrix.python-version }}
4949

50+
- name: Install uv
51+
uses: astral-sh/setup-uv@v3
52+
5053
- name: Install dependencies
51-
run: |
52-
python -m pip install --upgrade pip
53-
pip install -r requirements.txt
54-
pip install pytest pytest-asyncio pytest-cov
54+
run: uv sync
5555

5656
- name: Run tests
5757
run: |
58-
pytest tests/ -v --cov=youtrack_rocket_mcp --cov-report=term-missing
58+
uv run pytest tests/ -v --cov=youtrack_rocket_mcp --cov-report=term-missing
5959
continue-on-error: true # Don't fail if tests are missing
6060

6161
build:
@@ -70,16 +70,15 @@ jobs:
7070
with:
7171
python-version: '3.12'
7272

73-
- name: Install build tools
74-
run: |
75-
python -m pip install --upgrade pip
76-
pip install build twine
73+
- name: Install uv
74+
uses: astral-sh/setup-uv@v3
7775

7876
- name: Build package
79-
run: python -m build
77+
run: uv build
8078

8179
- name: Check distribution
8280
run: |
81+
uv pip install twine
8382
twine check dist/*
8483
ls -lah dist/
8584

0 commit comments

Comments
 (0)