lint.yaml 689 B

123456789101112131415161718192021222324252627
  1. name: flake8
  2. on: [push]
  3. jobs:
  4. lint:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v2
  8. - name: Set up Python 3.9
  9. uses: actions/setup-python@v1
  10. with:
  11. python-version: 3.9
  12. - name: Install dependencies
  13. run: |
  14. python -m pip install --upgrade pip
  15. pip install flake8
  16. - name: Setup flake8 config
  17. run: |
  18. echo '[flake8]' > setup.cfg
  19. echo 'max-line-length = 120' >> setup.cfg
  20. - name: Analysing the code with flake8
  21. run: |
  22. find -name upgrade_strategy -exec sh -c "flake8 {} && exit 0 || echo $? > .exit_status" \;
  23. test -f .exit_status && rm .exit_status && exit 1; exit 0;