Skip to content

Build & Test

Build & Test #180

Workflow file for this run

name: Build & Test
on:
pull_request:
push:
branches:
- main
schedule:
# runs the CI everyday at 10AM
- cron: "0 10 * * *"
jobs:
build_and_test:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
toolchain: ["nightly"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy
- name: Check format
run: cargo +nightly fmt --all --check
- name: Minimal-feature code analysis
run: cargo +nightly clippy --workspace --no-default-features -- -D warnings
- name: Full-feature code analysis
run: cargo +nightly clippy --workspace --all-targets --all-features -- -D warnings
- name: Run tests
run: cargo +nightly test --all-features
- name: Run tests under WASI
if: startsWith(matrix.os, 'macos')
run: |
rustup +nightly target add wasm32-wasi
brew install wasmer
CARGO_TARGET_WASM32_WASI_RUNNER="wasmer" cargo +nightly test --target="wasm32-wasi"