fix: update tests.yaml in actions #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
tags: ["v*"] | ||
env: | ||
CARGO_TERM_COLOR: always | ||
concurrency: | ||
group: ghcr-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
run-wasm-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Update local toolchain | ||
run: | | ||
rustup update stable | ||
rustup component add rustfmt | ||
rustup target add wasm32-wasi | ||
- name: Install wasm-opt | ||
run: | | ||
sudo apt install -y binaryen xz-utils | ||
- name: Toolchain info | ||
run: | | ||
cargo --version --verbose | ||
rustc --version | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: "build" | ||
- name: test hello-wasm | ||
run: | | ||
cargo build -p hello-wasm --target wasm32-wasi --release | ||
cargo test -p land-wasm-host --release |