pythonapp.yml 850 B

12345678910111213141516171819202122232425262728293031
  1. name: Python application
  2. on: [push]
  3. jobs:
  4. build:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v2
  8. - name: Set up Python 3.8
  9. uses: actions/setup-python@v1
  10. with:
  11. python-version: 3.8
  12. - name: Install dependencies
  13. run: |
  14. python -m pip install --upgrade pip
  15. pip install -r requirements.txt
  16. - name: Lint with flake8
  17. run: |
  18. pip install flake8
  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. # pip install pytest
  26. # pytest