_test.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. name: Tests
  2. on:
  3. workflow_call: null
  4. jobs:
  5. e2e:
  6. name: E2E Tests
  7. timeout-minutes: 60
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: actions/checkout@v3
  11. - uses: actions/setup-node@v3
  12. with:
  13. node-version: 20
  14. - name: Install dependencies
  15. run: npm ci
  16. - name: Install Playwright Browsers
  17. run: npx playwright install --with-deps
  18. working-directory: packages/quill
  19. - name: Run Playwright tests
  20. run: npm run test:e2e
  21. working-directory: packages/quill
  22. fuzz:
  23. name: Fuzz Tests
  24. runs-on: ubuntu-latest
  25. steps:
  26. - name: Git checkout
  27. uses: actions/checkout@v3
  28. - name: Use Node.js
  29. uses: actions/setup-node@v3
  30. with:
  31. node-version: 20
  32. - run: npm ci
  33. env:
  34. PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
  35. - run: npm run test:fuzz -w quill
  36. unit:
  37. name: Unit Tests
  38. runs-on: ubuntu-latest
  39. strategy:
  40. fail-fast: false
  41. matrix:
  42. browser:
  43. - firefox
  44. steps:
  45. - name: Git checkout
  46. uses: actions/checkout@v3
  47. - name: Use Node.js
  48. uses: actions/setup-node@v3
  49. with:
  50. node-version: 20
  51. - uses: saucelabs/sauce-connect-action@v2
  52. with:
  53. tunnelName: github-actions-${{github.run_id}}.${{github.run_number}}
  54. username: ${{ secrets.SAUCE_USERNAME }}
  55. accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
  56. region: us-west
  57. noSSLBumpDomains: all
  58. - run: npm ci
  59. env:
  60. PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
  61. - run: npm run lint
  62. - run: npm run test:unit -w quill || npm run test:unit -w quill || npm run
  63. test:unit -w quill
  64. env:
  65. BROWSER: ${{ matrix.browser }}
  66. PROVIDER: Sauce Labs
  67. SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
  68. SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
  69. SAUCE_TUNNEL_NAME: github-actions-${{github.run_id}}.${{github.run_number}}