2019-09-04 07:36:50 +00:00
|
|
|
name: Python CI
|
|
|
|
|
|
|
|
# This workflow will be triggered when a PR modifies some python relevant files
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
2019-12-30 05:24:43 +00:00
|
|
|
- "**.py"
|
2019-09-04 07:36:50 +00:00
|
|
|
- "requirements.txt"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
python_lint:
|
|
|
|
name: python lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-09-01 17:39:17 +00:00
|
|
|
python-version: [3.6, 3.7, 3.8]
|
2019-09-04 07:36:50 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Set up Python environment
|
|
|
|
uses: actions/setup-python@master
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2020-05-19 11:54:14 +00:00
|
|
|
export IDF_PATH=${GITHUB_WORKSPACE}
|
2019-09-04 07:36:50 +00:00
|
|
|
pip install --upgrade pip
|
|
|
|
pip install -r requirements.txt
|
|
|
|
- name: Lint with flake8
|
|
|
|
run: |
|
|
|
|
pip install flake8
|
2020-05-19 11:54:14 +00:00
|
|
|
flake8 . --config=.flake8 --benchmark
|