format-backend.yaml 889 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: Python CI
  2. on:
  3. push:
  4. branches:
  5. - main
  6. - dev
  7. paths:
  8. - 'backend/**'
  9. - 'pyproject.toml'
  10. - 'uv.lock'
  11. pull_request:
  12. branches:
  13. - main
  14. - dev
  15. paths:
  16. - 'backend/**'
  17. - 'pyproject.toml'
  18. - 'uv.lock'
  19. jobs:
  20. build:
  21. name: 'Format Backend'
  22. runs-on: ubuntu-latest
  23. strategy:
  24. matrix:
  25. python-version:
  26. - 3.11.x
  27. - 3.12.x
  28. steps:
  29. - uses: actions/checkout@v5
  30. - name: Set up Python
  31. uses: actions/setup-python@v6
  32. with:
  33. python-version: '${{ matrix.python-version }}'
  34. - name: Install dependencies
  35. run: |
  36. python -m pip install --upgrade pip
  37. pip install black
  38. - name: Format backend
  39. run: npm run format:backend
  40. - name: Check for changes after format
  41. run: git diff --exit-code