-
-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (40 loc) · 1.44 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
44
45
46
47
48
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.75.0", "nightly"]
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 (--no-default-features)
run: cargo clippy --workspace --no-default-features -- -D warnings
- name: Code analysis (--all-targets --all-features)
if: matrix.toolchain == 'nightly' # experimental-api requires nightly
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Run tests (--no-default-features)
run: cargo test --workspace --no-default-features
- name: Run tests (--all-features)
if: matrix.toolchain == 'nightly' # experimental-api requires nightly
run: cargo test --workspace --all-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" --package=rearch