-
Notifications
You must be signed in to change notification settings - Fork 32
42 lines (33 loc) · 941 Bytes
/
Copy pathci.yml
File metadata and controls
42 lines (33 loc) · 941 Bytes
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
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
name: Ruff lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install ruff
run: pip install ruff
- name: Lint custom component
run: ruff check custom_components/alphaess tests
test:
runs-on: ubuntu-latest
name: Pytest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install test dependencies
run: |
pip install -r requirements_test.txt
pip install $(python -c "import json; print(' '.join(json.load(open('custom_components/alphaess/manifest.json'))['requirements']))")
- name: Run tests with 100% coverage gate
run: pytest --cov --cov-report=term-missing