1
0

playwright.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: Playwright Tests
  2. on:
  3. push:
  4. branches: [ main, master ]
  5. pull_request:
  6. branches: [ main, master ]
  7. defaults:
  8. run:
  9. working-directory: ./playwright-tests
  10. concurrency:
  11. group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  12. cancel-in-progress: true
  13. jobs:
  14. test:
  15. if: github.event.pull_request.draft == false
  16. timeout-minutes: 60
  17. runs-on: ubuntu-20.04
  18. steps:
  19. # Do our best to cache the toolchain and node install steps
  20. - uses: actions/checkout@v3
  21. - uses: actions/setup-node@v3
  22. with:
  23. node-version: 16
  24. - name: Install Rust
  25. uses: actions-rs/toolchain@v1
  26. with:
  27. profile: minimal
  28. toolchain: stable
  29. override: true
  30. - uses: Swatinem/rust-cache@v2
  31. - name: Install WASM toolchain
  32. run: rustup target add wasm32-unknown-unknown
  33. - name: Install dependencies
  34. run: npm ci
  35. - name: Install Playwright
  36. run: npm install -D @playwright/test
  37. - name: Install Playwright Browsers
  38. run: npx playwright install --with-deps
  39. # Cache the CLI by using cargo run internally
  40. # - name: Install Dioxus CLI
  41. # uses: actions-rs/cargo@v1
  42. # with:
  43. # command: install
  44. # args: --path packages/cli
  45. - name: Run Playwright tests
  46. run: npx playwright test
  47. - uses: actions/upload-artifact@v3
  48. if: always()
  49. with:
  50. name: playwright-report
  51. path: playwright-report/
  52. retention-days: 30