-
Notifications
You must be signed in to change notification settings - Fork 33
41 lines (38 loc) · 1.02 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
name: test
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
jobs:
test:
name: ${{ matrix.os }} / Rust ${{ matrix.rust }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
rust: [stable]
include:
- os: ubuntu-latest
rust: 1.65.0 # MSRV
- os: ubuntu-latest
rust: beta
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- run: cd hjson && cargo build --release
- if: matrix.rust != '1.65.0'
run: cd hjson_cli && cargo build --release
- run: |
if [ '${{ matrix.rust }}' == '1.65.0' ]; then
# because of 'clap_derive' it needs Rust 1.74+
cargo test --workspace --exclude hjson -- --nocapture
else
cargo test --workspace -- --nocapture
fi
- run: cd hjson && cargo doc