ruff.yml 824 B

12345678910111213141516171819202122232425262728293031323334
  1. name: ruff
  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. branches:
  10. - main
  11. jobs:
  12. ruff:
  13. runs-on: ubuntu-latest
  14. strategy:
  15. matrix:
  16. python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
  17. steps:
  18. - uses: actions/checkout@v2
  19. - name: Set up Python ${{ matrix.python-version }}
  20. uses: actions/setup-python@v2
  21. with:
  22. python-version: ${{ matrix.python-version }}
  23. - name: Install dependencies
  24. run: |
  25. python -m pip install --upgrade pip
  26. pip install ruff==0.1.5 codespell==2.3.0 tomli==2.0.1
  27. - name: Analysing the code with ruff
  28. run: |
  29. ruff .
  30. - name: Spelling check with codespell
  31. run: |
  32. codespell --toml pyproject.toml