browser-testing.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: Browser Tests
  2. on:
  3. push:
  4. paths:
  5. - 'web/**'
  6. - 'test/automated/browser/**'
  7. pull_request:
  8. paths:
  9. - 'web/**'
  10. - 'test/automated/browser/**'
  11. jobs:
  12. cypress-run:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - id: skip_check
  16. uses: fkirc/skip-duplicate-actions@v5
  17. with:
  18. concurrent_skipping: 'same_content_newer'
  19. - name: Check out pull request code
  20. uses: actions/checkout@v4
  21. if: github.event_name == 'pull_request'
  22. with:
  23. repository: ${{ github.event.pull_request.head.repo.full_name }}
  24. - name: Check out repository code
  25. uses: actions/checkout@v4
  26. if: github.event_name == 'push'
  27. - uses: actions/setup-node@v4
  28. with:
  29. node-version: '22.9.0'
  30. - name: Cache node modules
  31. uses: actions/cache@v4
  32. env:
  33. cache-name: cache-node-modules-browser-tests
  34. with:
  35. path: ~/.npm
  36. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('test/automated/browser/package-lock.json') }}
  37. restore-keys: |
  38. ${{ runner.os }}-build-${{ env.cache-name }}-
  39. ${{ runner.os }}-build-
  40. ${{ runner.os }}-
  41. - uses: actions/setup-go@v5
  42. with:
  43. go-version: '1.22'
  44. cache: true
  45. - name: Install Google Chrome
  46. run: sudo apt-get update && sudo apt-get install google-chrome-stable
  47. - name: Run Browser tests
  48. uses: nick-fields/retry@v3
  49. with:
  50. timeout_minutes: 20
  51. max_attempts: 3
  52. command: cd test/automated/browser && ./run.sh