generated from ludeeus/integration_blueprint
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (87 loc) · 2.6 KB
/
ci.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: "CI"
on:
workflow_dispatch:
push:
branches:
- "main"
pull_request:
branches:
- "main"
env:
DEFAULT_PYTHON: "3.12"
jobs:
hassfest: # https://developers.home-assistant.io/blog/2020/04/16/hassfest
name: "Hassfest Validation"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout the repository"
uses: "actions/[email protected]"
- name: "Run hassfest validation"
uses: "home-assistant/actions/hassfest@master"
hacs: # https://github.com/hacs/action
name: "HACS Validation"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout the repository"
uses: "actions/[email protected]"
- name: "Run HACS validation"
uses: "hacs/action@main"
with:
category: "integration"
tests:
runs-on: "ubuntu-latest"
name: Tests
steps:
- name: Check out code from GitHub
uses: "actions/[email protected]"
- name: Setup Python ${{ env.DEFAULT_PYTHON }}
uses: "actions/[email protected]"
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Set up poetry
uses: snok/[email protected]
- name: "Set up dependencies"
run: poetry install --no-interaction
- name: Tests suite
run: |
poetry run pytest -p no:sugar
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
verbose: true
lint:
runs-on: "ubuntu-latest"
name: Lint
steps:
- name: Check out code from GitHub
uses: "actions/[email protected]"
- name: Setup Python ${{ env.DEFAULT_PYTHON }}
uses: "actions/[email protected]"
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Set up poetry
uses: snok/[email protected]
- name: "Set up dependencies"
run: poetry install --no-interaction
- name: "Lint"
run: poetry run ruff check .
- name: "Format"
run: poetry run ruff format . --check
mypy:
runs-on: "ubuntu-latest"
name: Typing
steps:
- name: Check out code from GitHub
uses: "actions/[email protected]"
- name: Setup Python ${{ env.DEFAULT_PYTHON }}
uses: "actions/[email protected]"
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Set up poetry
uses: snok/[email protected]
- name: "Set up dependencies"
run: poetry install --no-interaction
- name: "mypy"
run: poetry run mypy -p custom_components.hass_web_proxy