86 lines
2.4 KiB
YAML
86 lines
2.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
|
|
jobs:
|
|
pylint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.7'
|
|
- name: Set up Python environment
|
|
run: |
|
|
pip3 install -e .
|
|
pip3 install -r requirements_test.txt
|
|
- name: Register problem matcher
|
|
run: |
|
|
echo "::add-matcher::.github/workflows/matchers/pylint.json"
|
|
- run: pylint aioesphomeapi
|
|
flake8:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.7'
|
|
- name: Set up Python environment
|
|
run: |
|
|
pip3 install -e .
|
|
pip3 install -r requirements_test.txt
|
|
- name: Register problem matcher
|
|
run: |
|
|
echo "::add-matcher::.github/workflows/matchers/flake8.json"
|
|
- run: flake8 aioesphomeapi
|
|
black:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.7'
|
|
- name: Set up Python environment
|
|
run: |
|
|
pip3 install -e .
|
|
pip3 install -r requirements_test.txt
|
|
- run: black --safe --exclude 'api_pb2.py|api_options_pb2.py' aioesphomeapi
|
|
isort:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.7'
|
|
- name: Set up Python environment
|
|
run: |
|
|
pip3 install -e .
|
|
pip3 install -r requirements_test.txt
|
|
- name: Register problem matcher
|
|
run: |
|
|
echo "::add-matcher::.github/workflows/matchers/isort.json"
|
|
- run: isort --check aioesphomeapi
|
|
mypy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.7'
|
|
- name: Set up Python environment
|
|
run: |
|
|
pip3 install -e .
|
|
pip3 install -r requirements_test.txt
|
|
- name: Register problem matcher
|
|
run: |
|
|
echo "::add-matcher::.github/workflows/matchers/mypy.json"
|
|
- run: mypy --strict aioesphomeapi
|