python_lint.yml 778 B

1234567891011121314151617181920212223242526272829303132
  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: [2.7, 3.5, 3.6, 3.7]
  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. pip install --upgrade pip
  25. pip install -r requirements.txt
  26. - name: Lint with flake8
  27. run: |
  28. pip install flake8
  29. flake8 . --config=.flake8