-
Notifications
You must be signed in to change notification settings - Fork 15
80 lines (71 loc) · 2.03 KB
/
main.yaml
File metadata and controls
80 lines (71 loc) · 2.03 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
name: Test PyShEx
env:
UV_VERSION: "0.7.13"
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
quality-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- uses: actions/setup-python@v6
with:
python-version: 3.13
- name: Install tox
run: python -m pip install tox
- name: Run codespell
run: tox -e codespell
test:
needs:
- quality-checks
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
# Test on Windows with only the oldest and newest Python versions
# See https://github.com/snok/install-poetry#running-on-windows
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
uv sync --group dev
- name: Verify uv.lock is up-to-date
run: uv lock --check
- name: Generate coverage results
# Set bash shell to fail correctly on Windows https://github.com/actions/runner-images/issues/6668
shell: bash
run: |
uv run coverage run -m pytest
uv run coverage xml
uv run coverage report -m
- name: Upload coverage report
uses: codecov/codecov-action@v6.0.0
with:
name: codecov-results-${{ matrix.os }}-${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
fail_ci_if_error: false