commitflow-frontend.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. name: Frontend CI
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. branches:
  8. - master
  9. jobs:
  10. hue-ui-checks-and-tests:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Checkout
  14. uses: actions/checkout@v4
  15. - name: Cache npm with setup node
  16. uses: actions/setup-node@v4
  17. with:
  18. node-version: 20
  19. cache: 'npm'
  20. - name: Install npm dependencies
  21. run: npm ci
  22. - name: Run commit title format check
  23. run: ./tools/ci/check_for_commit_message.sh
  24. - name: Run npm version checker
  25. run: npm run check-pinned-versions
  26. - name: Run npm license checker
  27. run: npm run check-license
  28. - name: Run npm absolute path detection
  29. run: npm run check-absolute-paths
  30. - name: Run prettier check
  31. run: npm run prettier
  32. - name: Run js lint check
  33. run: npm run lint
  34. - name: Run style lint check
  35. run: npm run style-lint
  36. - name: Run js tests
  37. run: |
  38. # https://jestjs.io/docs/en/troubleshooting.html#tests-are-extremely-slow-on-docker-andor-continuous-integration-ci-server
  39. sed -i 's/"test": "jest"/"test": "jest --runInBand"/g' package.json
  40. npm run test