-
Notifications
You must be signed in to change notification settings - Fork 8
65 lines (59 loc) · 1.8 KB
/
test.yml
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
name: test
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
pytest:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "uv.lock"
- run: uv sync --group test
- run: uv run coverage run -m pytest -s -vv
- run: uv run coverage report
- run: uv run coverage html
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report-${{ matrix.os }}-${{ matrix.python-version }}
path: htmlcov
retention-days: 5
action:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "uv.lock"
- run: uv sync
- run: uv run creosote --venv .venv --exclude-dep tomli
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check pre-commit rev format
# this is needed because release-please does not add in the "v" prefix
run: |
if grep "rev:" .pre-commit-config.yaml | grep -v "rev: v"; then
echo "Error: Found rev: entries without 'v' prefix"
exit 1
fi