pythonapp.yml 850 B

12345678910111213141516171819202122232425
  1. name: Python application
  2. on: [push, pull_request]
  3. jobs:
  4. build:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v1
  8. - name: Set up Python 3
  9. uses: actions/setup-python@v1
  10. with:
  11. python-version: 3.x
  12. - name: Install dependencies
  13. run: |
  14. python -m pip install --upgrade pip
  15. pip install flake8 pytest
  16. pip install -r requirements.txt || true
  17. - name: Lint with flake8
  18. run: |
  19. # stop the build if there are Python syntax errors or undefined names
  20. flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
  21. # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
  22. flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
  23. - name: Test with pytest
  24. run: |
  25. pytest || true