playwright.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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-latest
  18. steps:
  19. # Do our best to cache the toolchain and node install steps
  20. - uses: actions/checkout@v4
  21. - uses: actions/setup-node@v4
  22. with:
  23. node-version: 16
  24. - name: Install Rust
  25. uses: dtolnay/rust-toolchain@master
  26. with:
  27. toolchain: stable
  28. targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown
  29. - uses: Swatinem/rust-cache@v2
  30. - name: Install dependencies
  31. run: npm ci
  32. - name: Install Playwright
  33. run: npm install -D @playwright/test
  34. - name: Install Playwright Browsers
  35. run: npx playwright install --with-deps
  36. # Cache the CLI by using cargo run internally
  37. # - name: Install Dioxus CLI
  38. # uses: actions-rs/cargo@v1
  39. # with:
  40. # command: install
  41. # args: --path packages/cli
  42. - name: Run Playwright tests
  43. run: npx playwright test
  44. - uses: actions/upload-artifact@v4
  45. if: always()
  46. with:
  47. name: playwright-report
  48. path: playwright-report/
  49. retention-days: 30