fix: Update build (#12) #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Diesel WASM Backend | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# only run tests when related changes are made | |
paths: | |
- ".github/workflows/test.yml" | |
- "src/**" | |
- "Cargo.toml" | |
- "Cargo.lock" | |
- "rust-toolchain" | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Firefox | |
run: sudo apt-get update && sudo apt-get install -y firefox | |
- name: Update rust toolchains | |
run: rustup update | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: | | |
. | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".node-version" | |
cache-dependency-path: "yarn.lock" | |
cache: "yarn" | |
env: | |
SKIP_YARN_COREPACK_CHECK: "1" | |
- name: Enable corepack | |
run: corepack enable | |
- name: Install dependencies | |
run: yarn | |
- name: Build rust | |
run: cargo build --target wasm32-unknown-unknown --tests --features unsafe-debug-query | |
- name: Test in Chrome | |
run: yarn test:chrome:headless | |
- name: Test in Firefox | |
run: yarn test:firefox:headless |