Skip to content

Commit 8289335

Browse files
committed
ci: use uv on ci instead of pip
1 parent 33a767c commit 8289335

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.github/workflows/test-and-lint.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,25 @@ jobs:
3131
- name: Wait for Typesense
3232
run: |
3333
timeout 20 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8108/health)" != "200" ]]; do sleep 1; done' || false
34+
3435
- uses: actions/checkout@v4
3536

36-
- name: Set up Python ${{ matrix.python-version }}
37-
uses: actions/setup-python@v4
37+
- name: Install uv and set the python version
38+
uses: astral-sh/setup-uv@v5
3839
with:
3940
python-version: ${{ matrix.python-version }}
40-
cache: 'pip'
4141

42-
- name: Install dependencies
43-
run: |
44-
python -m pip install --upgrade pip
45-
pip install -r requirements/dev.txt
42+
- name: Install the project
43+
run: uv sync --locked --all-extras --dev
4644

47-
- name: Lint with Flake8
45+
- name: Lint with Ruff
4846
run: |
49-
flake8 src/typesense
47+
uv run ruff check src/typesense
5048
5149
- name: Check types with mypy
5250
run: |
53-
mypy src/typesense
51+
uv run mypy src/typesense
5452
5553
- name: Run tests and coverage (excluding OpenAI)
5654
run: |
57-
coverage run -m pytest -m "not open_ai"
55+
uv run coverage run -m pytest -m "not open_ai"

0 commit comments

Comments
 (0)