-
-
Notifications
You must be signed in to change notification settings - Fork 12
44 lines (42 loc) · 1.29 KB
/
validate.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
name: Validate code
on:
push:
pull_request:
jobs:
hassfest:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: home-assistant/actions/hassfest@master
code_quality:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: [3.10.5]
steps:
- uses: "actions/checkout@v2"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install 'isort==5.*' black flake8 mypy pydocstyle types-python-dateutil
pip install -r requirements.txt
- name: Change directory
run: cd custom_components/holidays
- name: isort
run: isort --skip test --line-width 88 --trailing-comma -m 3 --profile black -o holidays --check-only .
- name: black
run: black --check .
- name: flake8
run: flake8 --max-line-length 88 .
- name: pydocstyle
run: pydocstyle .
- name: mypy
run: mypy --ignore-missing-imports --follow-imports=silent --warn-unused-ignores custom_components/holidays
bandit:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- name: Bandit Check (Python security linter)
uses: jpetrucciani/bandit-check@master
with:
path: '/custom_components/holidays/'