Skip to content

Commit 989b5b9

Browse files
authored
CI: fix Wasm testing (leptos-rs#511)
1 parent ca510f7 commit 989b5b9

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

.github/workflows/test.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
override: true
3131
components: rustfmt
3232

33+
- name: Add wasm32-unknown-unknown
34+
run: rustup target add wasm32-unknown-unknown
35+
3336
- name: Setup cargo-make
3437
uses: davidB/rust-cargo-make@v1
3538

@@ -43,4 +46,3 @@ jobs:
4346

4447
- name: Run tests with all features
4548
run: cargo make ci
46-

Makefile.toml

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ args = ["+nightly", "build-all-features"]
2020
install_crate = "cargo-all-features"
2121

2222
[tasks.build-wasm]
23-
command = "cargo"
24-
args = ["+nightly", "build-all-features", "--target=wasm32-unknown-unknown"]
25-
install_crate = "cargo-all-features"
23+
clear = true
24+
dependencies = [{ name = "build-wasm", path = "leptos" }]
2625

2726
[tasks.check-examples]
2827
clear = true

leptos/Makefile.toml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[tasks.build-wasm]
2+
clear = true
3+
dependencies = ["build-hydrate", "build-csr"]
4+
5+
[tasks.build-hydrate]
6+
command = "cargo"
7+
args = [
8+
"build",
9+
"--no-default-features",
10+
"--features=hydrate",
11+
"--target=wasm32-unknown-unknown",
12+
]
13+
14+
[tasks.build-csr]
15+
command = "cargo"
16+
args = [
17+
"build",
18+
"--no-default-features",
19+
"--features=csr",
20+
"--target=wasm32-unknown-unknown",
21+
]

0 commit comments

Comments
 (0)