-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (53 loc) · 1.38 KB
/
ci.yaml
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
name: Package CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
steps:
- uses: actions/checkout@v3
- name: Python ${{ matrix.python-version }} Setup
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: curl -LsSf https://astral.sh/uv/0.4.2/install.sh | sh
- name: Install package
run: uv sync --all-extras --dev
- name: Run ruff
shell: bash
run: |
uv run ruff check .
uv run ruff format . --check
- name: Run mypy
shell: bash
run: |
uv run mypy src --config pyproject.toml
- name: Run pytest
shell: bash
run: |
uv run pytest tests --cov=src --cov-report=html --cov-report=xml --cov-branch
- name: Upload coverage HTML
uses: actions/upload-artifact@v4
with:
name: coverage-html
path: htmlcov
- name: Upload coverage XML
uses: actions/upload-artifact@v4
with:
name: coverage-xml
path: coverage.xml
- name: Run covcheck
shell: bash
run: |
uv run covcheck coverage.xml --config pyproject.toml