Skip to content

Commit f2736cf

Browse files
committed
[ci] Migrate to uv for build, lint and test
1 parent 8e58edc commit f2736cf

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

.github/workflows/test.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Tests
33
on:
44
push:
55
pull_request:
6-
branches: [ "main" ]
6+
branches: ["main"]
77

88
jobs:
99
test:
@@ -14,18 +14,18 @@ jobs:
1414
python-version: ["3.10", "3.11", "3.12"]
1515
runs-on: ${{matrix.runs-on}}
1616
steps:
17-
- uses: actions/checkout@v4
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
python -m pip install ruff pytest
26-
- name: Install package
27-
run: python -m pip install .
28-
- name: Lint with ruff
29-
run: ruff check --output-format=github .
30-
- name: Run tests
31-
run: python -m pytest tests/
17+
- uses: actions/checkout@v5
18+
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v6
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install the project
25+
run: uv sync --all-extras --dev
26+
27+
- name: Lint with ruff
28+
run: uv run ruff check --output-format=github .
29+
30+
- name: Run tests
31+
run: uv run pytest --cov=cocoviz --cov-report=term-missing

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ ignore = ["F821"]
5454

5555
[tool.pytest]
5656
log_cli = true
57-
addopts = "--doctest-modules"
57+
addopts = ["--doctest-modules"]
5858

5959
[tool.pyright]
6060
reportAny = false

0 commit comments

Comments
 (0)