-
Notifications
You must be signed in to change notification settings - Fork 214
70 lines (61 loc) · 1.94 KB
/
test.yml
File metadata and controls
70 lines (61 loc) · 1.94 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# .github/workflows/test.yml
name: Test
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
env:
PREK_VERSION: '0.3.2'
jobs:
prek:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
activate-environment: true
- uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3.0.0
with:
just-version: '1'
- uses: j178/prek-action@564dda4cfa5e96aafdc4a5696c4bf7b46baae5ac # v1.1.0
with:
prek-version: ${{ env.PREK_VERSION }}
ci:
needs: prek
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
activate-environment: true
- run: uv sync --frozen
- name: Install the package to make sure nothing is randomly broken
run: just build-package
- name: Run pytest (unit tests)
run: just unit-tests
- name: Run mypy (static type check)
run: just type-check
python-version:
needs: prek
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: true
matrix:
python: ['3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
python-version: ${{ matrix.python }}
activate-environment: true
- run: uv sync --frozen
- name: Install the package to make sure nothing is randomly broken
run: just build-package
- name: Run pytest (unit tests)
run: just unit-tests