-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (92 loc) · 2.96 KB
/
Copy pathtest.yml
File metadata and controls
106 lines (92 loc) · 2.96 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: 🔂 Tests
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
tests:
name: 🧪 ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Python 3.10 / pytest 8
python-version: "3.10"
pytest-version: "pytest>=8,<9"
- name: Python 3.10 / pytest 9
python-version: "3.10"
pytest-version: "pytest>=9,<10"
- name: Python 3.11 / pytest 9
python-version: "3.11"
pytest-version: "pytest>=9,<10"
- name: Python 3.12 / pytest 9
python-version: "3.12"
pytest-version: "pytest>=9,<10"
- name: Python 3.13 / pytest 9
python-version: "3.13"
pytest-version: "pytest>=9,<10"
- name: Python 3.14 / pytest 9
python-version: "3.14"
pytest-version: "pytest>=9,<10"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- run: uv sync --locked
- run: uv run --locked --with "${{ matrix.pytest-version }}" pytest -vv
compatibility:
name: 🧩 Strawberry compatibility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
enable-cache: true
python-version: "3.14"
- run: uv sync --locked
- name: Run compatibility sessions
run: uv run nox --tags compatibility
quality:
name: ✨ Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
enable-cache: true
python-version: "3.12"
- run: uv sync --locked
- run: uv run ruff check .
- run: uv run ruff format --check .
- run: uv run mypy
- run: uv build
required-ci:
name: Required CI
if: ${{ always() }}
needs: [tests, compatibility, quality]
runs-on: ubuntu-latest
steps:
- name: Check required jobs
env:
NEEDS: ${{ toJson(needs) }}
run: |
echo "$NEEDS" | jq -r 'to_entries[] | "\(.key)=\(.value.result)"'
echo "$NEEDS" | jq -e 'to_entries | all(.value.result == "success")'