-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (53 loc) · 1.63 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
# running with macos since it contains the safari driver
runs-on: macos-latest
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: cargo build --target wasm32-unknown-unknown --tests --features unsafe-debug-query
- 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: ./