lint.yml 767 B

1234567891011121314151617181920212223242526272829303132333435
  1. name: Run linters
  2. on:
  3. workflow_dispatch:
  4. push:
  5. env:
  6. MAX_LINE_LENGTH: 110
  7. jobs:
  8. lint:
  9. runs-on: ubuntu-20.04
  10. steps:
  11. - uses: actions/checkout@v2
  12. with:
  13. submodules: true
  14. fetch-depth: 1
  15. - name: Set up Python
  16. uses: actions/setup-python@v1
  17. with:
  18. python-version: 3.9
  19. architecture: x64
  20. - name: Install flake8
  21. run: |
  22. pip install flake8
  23. - name: Lint with flake8
  24. run: |
  25. cd archivebox
  26. # one pass for show-stopper syntax errors or undefined names
  27. flake8 . --count --show-source --statistics
  28. # one pass for small stylistic things
  29. flake8 . --count --max-line-length="$MAX_LINE_LENGTH" --statistics