-
Notifications
You must be signed in to change notification settings - Fork 52
56 lines (46 loc) · 1.4 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
47
48
49
50
51
52
53
54
55
56
name: Test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches: [main]
pull_request_target:
branches: [main, "rc-*"]
jobs:
test:
if: github.repository_owner == 'viamrobotics'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
requirements-version: ["min", "max"]
steps:
- name: Checkout Push/Workflow Dispatch
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
uses: actions/checkout@v4
- name: Checkout PR
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Setup Python
run: uv python install ${{ matrix.python-version }}
- name: Install package
run: make install
- name: Install minimum package versions
run: uv pip install -r requirements-test.txt
if: ${{ matrix.requirements-version == 'min' }}
- name: Type Check
run: uv run make typecheck
- name: Lint
run: uv run make lint
- name: Test
run: uv run make test
- name: Test Documentation
run: uv run make test_docs