-
Notifications
You must be signed in to change notification settings - Fork 15
62 lines (50 loc) · 1.85 KB
/
ci.yml
File metadata and controls
62 lines (50 loc) · 1.85 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
name: CI
on:
workflow_call:
jobs:
lint-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.14"]
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install prek
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/latest/download/prek-installer.sh | sh
- name: Install dependencies
run: |
# Remove local path source overrides so uv resolves from PyPI
sed -i '/^\[tool\.uv\.sources\]/,/^$/d' pyproject.toml
uv lock
uv sync
- name: Format check with ruff
run: uv run ruff format --check custom_components/span_panel
- name: Lint with ruff
run: uv run ruff check custom_components/span_panel
- name: Type check with mypy
run: uv run mypy custom_components/span_panel
- name: Security check with bandit
run: uv run bandit -c pyproject.toml -r custom_components/span_panel
- name: Run prek hooks (for extra validation)
run: prek run --all-files --show-diff-on-failure
env:
SKIP: ""
- name: Run tests with coverage
run: uv run pytest tests/ --cov=custom_components/span_panel --cov-report=xml --cov-report=term-missing
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v6
with:
slug: SpanPanel/span
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
# Note: Token not required for public repos with tokenless upload