Skip to content

Commit

Permalink
Add CI steps to run the new tests with 'wasm-pack test'.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubadamw committed Jan 31, 2024
1 parent 2ae3e4d commit fd447b7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/curl_options
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--fail
--location
--retry 3
--retry-connrefused
--show-error
--silent
21 changes: 21 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: ci-build
on: [push, pull_request]

env:
WASM_PACK_VERSION: 0.12.1

jobs:
do-build:
runs-on: ubuntu-latest
Expand All @@ -14,3 +18,20 @@ jobs:
- run: cargo test --no-default-features --features=std
- run: cargo test --no-default-features

- name: Create a directory for binary dependencies
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/bin
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Install wasm-pack
working-directory: ${{ github.workspace }}/bin
shell: bash
run: |
file_name="wasm-pack-v${WASM_PACK_VERSION}-x86_64-unknown-linux-musl"
curl \
--config ${GITHUB_WORKSPACE}/.github/curl_options \
https://github.com/rustwasm/wasm-pack/releases/download/v${WASM_PACK_VERSION}/${file_name}.tar.gz \
| tar --strip-components=1 -xzvf- "${file_name}/wasm-pack"
- run: wasm-pack test --node

0 comments on commit fd447b7

Please sign in to comment.