-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.06 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Test
on:
workflow_call:
outputs:
tests-pass:
description: "Indicates if all tests passed"
value: ${{ github.event.inputs.tests-pass }}
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
# install a specific version of uv
version: "0.4.29"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Setup Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Lint and format check # Run linting before wasting time on testing
run: |
uvx ruff check .
uvx ruff format --check
- name: Install optional dependencies
run: uv sync --all-extras
- name: Run tests for all dependencies
run: uv run pytest