playwright.yml 1.3 KB

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