2
0

e2e.yml 1006 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. name: E2E Tests
  2. on:
  3. pull_request:
  4. branches: ["main"]
  5. merge_group:
  6. branches: ["main"]
  7. jobs:
  8. e2e:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v3
  12. - uses: actions/setup-node@v3
  13. with:
  14. node-version: 18
  15. - name: Rush Install
  16. run: node common/scripts/install-run-rush.js install
  17. - name: Rush build
  18. run: node common/scripts/install-run-rush.js build
  19. # 缓存 Playwright 浏览器
  20. - name: Cache Playwright browsers
  21. uses: actions/cache@v3
  22. with:
  23. path: ~/.cache/ms-playwright
  24. key: ${{ runner.os }}-playwright-${{ hashFiles('e2e/fixed-layout/package.json') }}
  25. restore-keys: |
  26. ${{ runner.os }}-playwright-
  27. - name: Install Playwright Browsers
  28. run: pushd e2e/fixed-layout && npx playwright install --with-deps --only-shell chromium && popd
  29. - name: Run E2E tests
  30. run: node common/scripts/install-run-rush.js e2e:test --verbose