Add GH actions for tests and SA #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}' |