lint_python.yml 740 B

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