2020-07-14 20:00:12 +02:00
|
|
|
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'
|
2020-12-22 20:45:02 +01:00
|
|
|
- name: Set up Python environment
|
2020-07-14 20:00:12 +02:00
|
|
|
run: |
|
|
|
|
pip3 install -e .
|
|
|
|
pip3 install -r requirements_test.txt
|
2021-06-18 17:57:02 +02:00
|
|
|
- name: Register problem matcher
|
|
|
|
run: |
|
|
|
|
echo "::add-matcher::.github/workflows/matchers/pylint.json"
|
2020-07-14 20:00:12 +02:00
|
|
|
- run: pylint aioesphomeapi
|
2021-06-18 17:57:02 +02:00
|
|
|
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
|