forked from Keats/validator
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (50 loc) · 1.56 KB
/
ci.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
49
50
51
name: ci
on: [push, pull_request]
jobs:
test_validator:
name: Continuous integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Extract Rust version from Cargo.toml
run: |
MSRV=$(sed -n 's/^rust-version = "\([^"]*\)"/\1/p' Cargo.toml)
echo "rust-version: $MSRV"
echo "MSRV=$MSRV" >> $GITHUB_ENV
- name: Install Rust
uses: dtolnay/rust-toolchain@stable # actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.MSRV }}
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Build System Info
run: rustc --version
- name: Tests
run: |
cargo build --no-default-features
cargo test --no-default-features
cargo build --features unic --features derive --features card
cargo test --features unic --features derive --features card
test_validator-nightly:
name: Continuous integration
runs-on: ubuntu-latest
strategy:
matrix:
include:
- rust: nightly
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Build System Info
run: rustc --version
- name: Tests
run: |
cargo build --no-default-features
cargo test --no-default-features
cargo build --all-features
cargo test --all-features