lint.yml 939 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Lint
  2. on: [push, pull_request]
  3. jobs:
  4. lint-frontend:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v4
  8. - name: Install Node.js 20
  9. uses: actions/setup-node@v4
  10. with:
  11. node-version: 20
  12. - name: Install dependencies
  13. run: |
  14. cd frontend
  15. npm install --frozen-lockfile
  16. - name: Lint
  17. run: |
  18. cd frontend
  19. npm run lint
  20. lint-python:
  21. name: Lint python
  22. runs-on: ubuntu-latest
  23. steps:
  24. - uses: actions/checkout@v4
  25. - name: Set up python
  26. uses: actions/setup-python@v5
  27. with:
  28. python-version: 3.11
  29. - name: Install pre-commit
  30. run: pip install pre-commit==3.7.0
  31. - name: Run pre-commit hooks
  32. run: |
  33. pre-commit run \
  34. --all-files \
  35. --show-diff-on-failure \
  36. --config ./dev_config/python/.pre-commit-config.yaml