lint_python.yml 700 B

123456789101112131415161718192021222324252627282930313233
  1. name: 'Python Lint'
  2. on:
  3. push:
  4. paths:
  5. - '**.py'
  6. pull_request:
  7. jobs:
  8. lint_python:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: 'Cleanup workspace'
  12. uses: AutoModality/action-clean@v1
  13. - name: 'Decontaminate previous build leftovers'
  14. run: |
  15. if [ -d .git ]
  16. then
  17. git submodule status \
  18. || git checkout `git rev-list --max-parents=0 HEAD | tail -n 1`
  19. fi
  20. - name: 'Checkout code'
  21. uses: actions/checkout@v2
  22. with:
  23. fetch-depth: 0
  24. - name: 'Setup python'
  25. uses: actions/setup-python@v2
  26. - name: 'Check python code with black'
  27. uses: psf/black@20.8b1