-
Notifications
You must be signed in to change notification settings - Fork 11
37 lines (34 loc) · 1.16 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
name: Test
on:
push:
branches-ignore:
- master # master is a protected branch so tests will be run when we create a PR
pull_request:
branches-ignore:
- master # master is a protected branch so tests will be run when we create a PR
env:
CARGO_TERM_COLOR: always
jobs:
build_stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest stable Rust
run: rustup install stable
- name: Check crate builds on stable
# NOTE: consider using https://github.com/frewsxcv/cargo-all-features, because all features != their arbitrary combinations
run: cargo build --features serde,numtraits,rand,arbitrary,borsh && cargo build
test_nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest nightly Rust
run: rustup install nightly
- name: Set nightly as default
run: rustup default nightly
- name: Build
run: cargo build --all-features --verbose
- name: Run tests
run: sh scripts/run_all_tests.sh
- name: Run doc tests
run: cargo test --all-features --doc && cargo test --doc