Skip to content

Commit

Permalink
feat: Run playwright tests in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus23 committed Mar 1, 2024
1 parent cd48653 commit 2ecba4e
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/tests_and_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,8 @@ jobs:
- name: Run Tests
run: cargo test --manifest-path car-mirror/Cargo.toml --all-features

run-headless-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
browser: [ firefox, chrome ]

# include:
# bug w/ wasm-bindgen: https://github.com/rustwasm/wasm-bindgen/issues/3004
# - os: macos-latest
# browser: safari
run-playwright-tests:
runs-on: ubuntu-latest

defaults:
run:
Expand All @@ -126,8 +116,20 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Install cargo-binstall
uses: cargo-bins/[email protected]

- name: Install wasm-bindgen
run: cargo binstall wasm-bindgen-cli

- name: Install wasm-opt (via binaryen)
run: sudo apt-get install -y binaryen

- name: Install NPM dependencies
run: npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Cache Project
uses: Swatinem/rust-cache@v2
Expand All @@ -138,5 +140,5 @@ jobs:
override: true
toolchain: stable

- name: Run Rust Headless Browser Tests
run: wasm-pack test --headless --${{ matrix.browser }}
- name: Run Playwright tests
run: npx playwright test

0 comments on commit 2ecba4e

Please sign in to comment.