name: Build and test polyvalid
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
CARGO_NET_GIT_FETCH_WITH_CLI: true
RUST_LOG: info
jobs:
build:
name: Build polyvalid
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
shared-key: rust-cache
- name: Non-Rust Cache
uses: actions/cache@v3
with:
path: |
**/generated_bindings/
**/node_modules/
key: non-rust-cache
- name: Setup Wasmer
uses: wasmerio/setup-wasmer@v1
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Install cargo-wapm
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-wapm@0.2.2 --debug
- name: Install the wasm32 target
run: rustup target add wasm32-unknown-unknown
- name: Test
uses: actions-rs/cargo@v1
with:
command: test