lint.yml 660 B

12345678910111213141516171819202122232425262728293031323334
  1. name: Lint
  2. on:
  3. # Trigger the workflow on push or pull request,
  4. # but only for the main branch
  5. push:
  6. branches:
  7. - main
  8. pull_request:
  9. branches:
  10. - main
  11. jobs:
  12. run-linters:
  13. name: Run linters
  14. runs-on: ubuntu-latest
  15. steps:
  16. - name: Check out Git repository
  17. uses: actions/checkout@v2
  18. - name: Set up Python
  19. uses: actions/setup-python@v1
  20. with:
  21. python-version: 3.8
  22. - name: Install Python dependencies
  23. run: pip install black black[jupyter] flake8
  24. - name: lint isort
  25. run: isort --check --diff
  26. - name: lint black
  27. run: black --check --diff