go.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. name: Go
  2. on:
  3. push:
  4. branches: ["main"]
  5. pull_request:
  6. branches: ["main"]
  7. permissions:
  8. contents: read
  9. actions: write
  10. jobs:
  11. go_tests:
  12. #runs-on: alrest-techarohq
  13. runs-on: ubuntu-24.04
  14. steps:
  15. - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
  16. with:
  17. persist-credentials: false
  18. - name: build essential
  19. run: |
  20. sudo apt-get update
  21. sudo apt-get install -y build-essential
  22. - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
  23. with:
  24. node-version: "24.11.0"
  25. - uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
  26. with:
  27. go-version: "1.25.4"
  28. - name: Cache playwright binaries
  29. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
  30. id: playwright-cache
  31. with:
  32. path: |
  33. ~/.cache/ms-playwright
  34. key: ${{ runner.os }}-playwright-${{ hashFiles('**/go.sum') }}
  35. - name: install node deps
  36. run: |
  37. npm ci
  38. - name: install playwright browsers
  39. run: |
  40. npx --no-install playwright@1.52.0 install --with-deps
  41. npx --no-install playwright@1.52.0 run-server --port 9001 &
  42. - name: Build
  43. run: npm run build
  44. - name: Test
  45. run: npm run test
  46. - name: Lint with staticcheck
  47. uses: dominikh/staticcheck-action@024238d2898c874f26d723e7d0ff4308c35589a2 # v1.4.0
  48. with:
  49. version: "latest"
  50. - name: Govulncheck
  51. run: |
  52. go tool govulncheck ./...