lint.yml 644 B

123456789101112131415161718192021222324252627282930313233
  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. - main
  10. jobs:
  11. run-linters:
  12. name: Run linters
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Check out Git repository
  16. uses: actions/checkout@v2
  17. - name: Set up Python
  18. uses: actions/setup-python@v1
  19. with:
  20. python-version: 3.8
  21. - name: Install Python dependencies
  22. run: pip install black black[jupyter] flake8
  23. - name: lint isort
  24. run: isort --check --diff
  25. - name: lint black
  26. run: black --check --diff