lint.yml 997 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Lint
  2. concurrency:
  3. group: lint-${{ github.head_ref || github.ref }}
  4. cancel-in-progress: true
  5. on:
  6. push:
  7. paths:
  8. - "**.py"
  9. - ".github/workflows/lint.yml"
  10. pull_request:
  11. paths:
  12. - "**.py"
  13. - ".github/workflows/lint.yml"
  14. permissions:
  15. contents: read
  16. jobs:
  17. pylint:
  18. runs-on: ubuntu-latest
  19. steps:
  20. - uses: actions/checkout@v3
  21. - uses: actions/setup-python@v4
  22. with:
  23. python-version: '3.x'
  24. - run: python -m pip install pylint
  25. - run: pylint mesonbuild
  26. flake8:
  27. runs-on: ubuntu-latest
  28. steps:
  29. - uses: actions/checkout@v3
  30. - uses: actions/setup-python@v4
  31. with:
  32. python-version: '3.x'
  33. - run: python -m pip install flake8
  34. - run: flake8 mesonbuild/
  35. mypy:
  36. runs-on: ubuntu-latest
  37. steps:
  38. - uses: actions/checkout@v3
  39. - uses: actions/setup-python@v4
  40. with:
  41. python-version: '3.x'
  42. - run: python -m pip install mypy types-PyYAML
  43. - run: python run_mypy.py