Skip to content

Commit 653aa54

Browse files
authored
Don't use wasm-pack in CI (yewstack#2648)
* don't use wasm-pack for wasm tests * use proper version of wasm-bindgen-cli * also run with chrome driver * use cargo pkgid
1 parent c4338a7 commit 653aa54

File tree

2 files changed

+30
-8
lines changed

2 files changed

+30
-8
lines changed

.github/workflows/main-checks.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,44 @@ jobs:
125125
override: true
126126
profile: minimal
127127

128-
- uses: jetli/[email protected]
129-
with:
130-
version: "latest"
128+
- uses: browser-actions/setup-geckodriver@latest
129+
- uses: nanasess/setup-chromedriver@v1
131130

132131
- uses: Swatinem/rust-cache@v1
133132

133+
- name: Install wasm-bindgen-cli
134+
shell: bash
135+
run: |
136+
if [ ! -f "Cargo.lock" ]; then
137+
cargo fetch
138+
fi
139+
VERSION=`cargo pkgid --frozen wasm-bindgen | cut -d ":" -f 3`
140+
cargo install --version $VERSION wasm-bindgen-cli
141+
142+
- name: debug
143+
run: |
144+
geckodriver --version
145+
echo ""
146+
which geckodriver
147+
chromedriver --version
148+
echo ""
149+
which chromedriver
150+
echo ""
151+
wasm-bindgen --version
152+
echo ""
153+
which wasm-bindgen
154+
134155
- name: Run tests - yew
135156
run: |
136157
cd packages/yew
137-
wasm-pack test --chrome --firefox --headless -- --features "wasm_test"
158+
CHROMEDRIVER=$(which chromedriver) cargo test --features wasm_test --target wasm32-unknown-unknown
159+
GECKODRIVER=$(which geckodriver) cargo test --features wasm_test --target wasm32-unknown-unknown
138160
139161
- name: Run tests - yew-router
140162
run: |
141163
cd packages/yew-router
142-
wasm-pack test --chrome --firefox --headless
143-
164+
CHROMEDRIVER=$(which chromedriver) cargo test --target wasm32-unknown-unknown
165+
GECKODRIVER=$(which geckodriver) cargo test --target wasm32-unknown-unknown
144166
145167
unit_tests:
146168
name: Unit Tests on ${{ matrix.toolchain }}

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ members = [
3939
"examples/suspense",
4040

4141
# Tools
42-
"tools/changelog",
43-
"tools/process-benchmark-results",
4442
"tools/benchmark-struct",
4543
"tools/benchmark-hooks",
44+
"tools/changelog",
45+
"tools/process-benchmark-results",
4646
"tools/website-test",
4747
]

0 commit comments

Comments
 (0)