-
-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (37 loc) · 1.2 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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: ["1.76.0", "stable"]
# NOTE: not using --all-features below since the better-api feature requires nightly
# and nightly clippy has some false positives
features: ["--no-default-features", "--features=logging"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy
- name: Check format
run: cargo fmt --all --check
- name: Code analysis
run: cargo clippy --workspace ${{ matrix.features }} -- -D warnings
- name: Run tests
run: cargo test --workspace ${{ matrix.features }}
- name: Run tests under WASI
if: startsWith(matrix.os, 'macos')
run: |
rustup target add wasm32-wasi
brew install wasmer
CARGO_TARGET_WASM32_WASI_RUNNER="wasmer" cargo test --target="wasm32-wasi"