Skip to content

Commit 95f39d7

Browse files
authored
Merge pull request #2444 from DanielNoord/cleanup-ci
Simplify CI by putting similar steps into a single action file
2 parents ae910e0 + 13b0c65 commit 95f39d7

File tree

5 files changed

+103
-151
lines changed

5 files changed

+103
-151
lines changed
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
name: CI
3+
4+
"on":
5+
push:
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
env:
12+
DEFAULT_PYTHON: "3.14"
13+
14+
jobs:
15+
lint:
16+
name: Lint
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- &checkout
21+
name: Check out the repository
22+
uses: actions/checkout@v5
23+
with:
24+
fetch-depth: 2
25+
26+
- &setup-python
27+
name: Set up Python ${{ env.DEFAULT_PYTHON }}
28+
uses: actions/[email protected]
29+
with:
30+
python-version: ${{ env.DEFAULT_PYTHON }}
31+
check-latest: true
32+
33+
- &setup-uv
34+
name: Install UV
35+
uses: astral-sh/setup-uv@v7
36+
with:
37+
enable-cache: true
38+
version-file: "pyproject.toml"
39+
40+
- &install-dependencies
41+
name: Install dependencies
42+
run: uv sync --all-extras --frozen
43+
44+
- name: Lint
45+
run: uv run --with tox-uv tox -e lint
46+
47+
build:
48+
if: github.repository_owner == 'PyCQA'
49+
name: Build
50+
runs-on: ubuntu-latest
51+
52+
steps:
53+
- *checkout
54+
- *setup-python
55+
- *setup-uv
56+
57+
- name: Build package
58+
run: uv build
59+
60+
test:
61+
name: Tests
62+
strategy:
63+
fail-fast: false
64+
matrix:
65+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
66+
os: [ubuntu-latest, macos-latest, windows-latest]
67+
runs-on: ${{ matrix.os }}
68+
env:
69+
FORCE_COLOR: 1
70+
71+
steps:
72+
- *checkout
73+
74+
- name: Set up Python ${{ matrix.python-version }}
75+
uses: actions/setup-python@v6
76+
with:
77+
python-version: ${{ matrix.python-version }}
78+
allow-prereleases: true
79+
check-latest: true
80+
81+
- *setup-uv
82+
- *install-dependencies
83+
84+
- name: Run tests
85+
run: uv run --with tox-uv tox -e py,coverage_report-ci
86+
87+
- name: Report Coverage
88+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == ${{ env.DEFAULT_PYTHON }}
89+
uses: codecov/codecov-action@v5
90+
91+
92+
integration:
93+
name: Integration tests
94+
runs-on: ubuntu-latest
95+
96+
steps:
97+
- *checkout
98+
- *setup-python
99+
- *setup-uv
100+
- *install-dependencies
101+
102+
- name: Test integration
103+
run: ./scripts/test_integration.sh

.github/workflows/integration.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/release-dev.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)