-
Notifications
You must be signed in to change notification settings - Fork 10
72 lines (59 loc) · 1.91 KB
/
Copy pathtest-library.yml
File metadata and controls
72 lines (59 loc) · 1.91 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
71
72
name: Test Library
on:
workflow_dispatch:
workflow_call:
permissions: { }
jobs:
test-library:
permissions:
contents: read
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: [ "3.12", "3.13", "3.14" ]
group: [ 1,2,3,4,5 ]
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Set up Python
run: uv python install
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: List pydantic version
run: uv pip show pydantic
# TODO: Test on the installed package instead of the source code directly
# in order to verify that the package is correctly installed
- name: Run tests
timeout-minutes: 10
run: uv run python -m pytest -m "not arch" --splits 5 --splitting-algorithm least_duration --group=${{ matrix.group }}
- name: Build artifacts
run: uv build
test-arch:
permissions:
contents: read
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
python-version: 3.14
- name: Set up Python
run: uv python install
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Run tests
timeout-minutes: 10
run: uv run python -m pytest -m "arch"