-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (56 loc) · 1.75 KB
/
1-tests.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
52
53
54
55
56
57
58
59
60
61
62
on: [push]
name: Tests
jobs:
tests:
name: Test Suite
runs-on: ubuntu-latest
env:
RUSTC_BACKTRACE: full
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cache stable toolchain
uses: actions/cache@v1
with:
path: ~/.rustup
key: ${{ runner.os }}-toolchain-stable-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-toolchain-stable-
- name: Cache cargo
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-stable-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-stable-
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-target-stable-${{ hashFiles('**/Cargo.lock') }}-quiet
restore-keys: |
${{ runner.os }}-target-stable-${{ hashFiles('**/Cargo.lock') }}-
${{ runner.os }}-target-stable-
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy, rustfmt
- name: Run cargo build
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: --allow=warnings
with:
command: build
args: --tests --workspace --all-features
- name: Run cargo test
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: --allow=warnings
with:
command: test
args: --workspace --all-features
- name: Clean Cargo cache
run: |
cargo install --force --no-default-features --features ci-autoclean cargo-cache
cargo-cache