Skip to content

feat(ci): add e2e test for wizer via componentize-js use #17

feat(ci): add e2e test for wizer via componentize-js use

feat(ci): add e2e test for wizer via componentize-js use #17

Workflow file for this run

name: e2e
on:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
# Ensure that the wizer binary works via componentize-js
componentize-js:
runs-on: ubuntu-latest
strategy:
matrix:
examples:
- folder: tests/fixtures/components/hello-world
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
path: |
~/.cargo/registry
~/.cargo/git
target
- run: cargo build --features=cli --release
# TODO: switch to NPM-released componentize-js once wizer bin is released
- working-directory: ${{ matrix.example.folder }}
run: |
git config --global --unset url.git@github.com:.insteadOf
git config --global --unset url.ssh://git@github.com/.insteadOf
git clone https://github.com/bytecodealliance/componentize-js.git
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
key: ${{ runner.os }}-cjs-${{ hashFiles('./componentize-js/package-lock.json') }}
restore-keys: |
${{ runner.os }}-cjs-
path: |
./componentize-js
- working-directory: ${{ matrix.example.folder }}
run: |
cd componentize-js
git submodule update --init --recursive
make all
- working-directory: ${{ matrix.example.folder }}
run: |
npm install ./componentize-js
npx componentize-js \
--wizer-bin=../../../../target/release/wizer \
-w wit \
-o component.wasm \
component.js