-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (43 loc) · 1.01 KB
/
sa.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
name: static-analysis
on:
pull_request:
branches:
- 'main'
paths-ignore:
- '.gitignore'
- '*.md'
- 'docs/**'
- 'commit-check'
push:
branches:
- 'gh-actions'
jobs:
python:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
name: ['black', 'isort', 'pylint', 'mypy']
include:
- name: black
cmd: 'black --check --diff ./'
- name: isort
cmd: 'isort --check --diff ./'
- name: pylint
cmd: 'pylint ha_app/'
- name: mypy
cmd: 'mypy ./'
name: 'python-sa (${{ matrix.name }})'
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- uses: actions/setup-python@master
with:
python-version: '3.11'
- name: Install python packages
run: |
pip install -U pip wheel
pip install -r requirements-dev.txt
- name: Run ${{ matrix.name }}
run: '${{ matrix.cmd }}'