-
Notifications
You must be signed in to change notification settings - Fork 3
71 lines (66 loc) · 2.06 KB
/
ci.yml
File metadata and controls
71 lines (66 loc) · 2.06 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
name: CI
on:
pull_request:
branches: [main, develop]
push:
branches: [develop]
jobs:
hassfest:
name: hassfest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: home-assistant/actions/hassfest@master
hacs-validate:
name: hacs-validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: hacs/action@main
with:
category: integration
# brands check requires submitting to hacs/brands repo first; skip for now
ignore: brands
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install python-yarbo from git
run: pip install git+https://github.com/markus-lassfolk/python-yarbo.git@main
- name: Install dependencies
run: |
pip install ruff mypy
pip install -r requirements_test.txt
- name: ruff check
run: ruff check custom_components/ tests/
- name: ruff format check
run: ruff format --check custom_components/ tests/
- name: mypy
run: mypy custom_components/yarbo/ || true # Non-blocking: HA core type stubs are incomplete
test:
name: test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install python-yarbo from git
run: pip install git+https://github.com/markus-lassfolk/python-yarbo.git@main
- name: Install dependencies
run: pip install -r requirements_test.txt
- name: Run tests
run: |
pytest tests/ --cov=custom_components/yarbo --cov-report=xml --cov-report=term-missing
- name: Upload coverage
uses: actions/upload-artifact@v7
with:
name: coverage-${{ matrix.python-version }}
path: coverage.xml