Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
insipx committed Oct 2, 2024
1 parent b8bca41 commit c1c4da6
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/test-wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Test Diesel WASM Backend
on:
push:
branches:
- main
pull_request:
# only run tests when related changes are made
paths:
- ".github/workflows/test-wasm.yml"
- "src/**"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain"
jobs:
test:
name: Test
# running with macos since it contains the safari driver
runs-on: warp-macos-13-arm64-6x
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: brew install --cask firefox
- name: Update rust toolchains
run: rustup update
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Setup node and yarn
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: Run Yarn install
uses: borales/actions-yarn@v5
with:
cmd: --cwd ./ install
- name: Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
- run: wasm-pack test --headless --safari --features unsafe-debug-query
working-directory: ./
- run: wasm-pack test --headless --chrome --features unsafe-debug-query
working-directory: ./
- run: wasm-pack test --headless --firefox --features unsafe-debug-query
working-directory: ./

0 comments on commit c1c4da6

Please sign in to comment.