-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (76 loc) · 2.14 KB
/
Copy pathci.yml
File metadata and controls
94 lines (76 loc) · 2.14 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
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# Many color libraries just need this variable to be set to any value.
# Set it to 3 to support 8-bit color graphics (256 colors per channel)
# for libraries that care about the value set.
FORCE_COLOR: 3
jobs:
lint:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: "3.x"
- uses: astral-sh/setup-uv@v7
- name: Create venv for ty
run: uv sync
- uses: j178/prek-action@v2
- name: Run Pylint
run: uvx nox -s pylint -- --output-format=github
checks:
name: >-
Test Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} (${{
matrix.deps }})
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.14"]
runs-on: [ubuntu-latest, windows-latest, macos-latest]
deps: [base, rs]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- uses: astral-sh/setup-uv@v7
- name: Install package (base)
if: matrix.deps == 'base'
run: uv sync --group test
- name: Install package (rs)
if: matrix.deps == 'rs'
run: uv sync --group test-rs
- name: Test package
run: >-
uv run pytest -ra --cov --cov-report=xml --cov-report=term
--durations=20
- name: Upload coverage report
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
pass:
if: always()
needs: [lint, checks]
runs-on: ubuntu-slim
timeout-minutes: 2
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}