python_lint.yml 831 B

123456789101112131415161718192021222324252627282930313233
  1. name: Python CI
  2. # This workflow will be triggered when a PR modifies some python relevant files
  3. on:
  4. pull_request:
  5. paths:
  6. - "**.py"
  7. - "requirements.txt"
  8. jobs:
  9. python_lint:
  10. name: python lint
  11. runs-on: ubuntu-latest
  12. strategy:
  13. matrix:
  14. python-version: [3.6, 3.7, 3.8]
  15. steps:
  16. - name: Checkout
  17. uses: actions/checkout@master
  18. - name: Set up Python environment
  19. uses: actions/setup-python@master
  20. with:
  21. python-version: ${{ matrix.python-version }}
  22. - name: Install dependencies
  23. run: |
  24. export IDF_PATH=${GITHUB_WORKSPACE}
  25. pip install --upgrade pip
  26. pip install -r requirements.txt
  27. - name: Lint with flake8
  28. run: |
  29. pip install flake8
  30. flake8 . --config=.flake8 --benchmark