-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (39 loc) · 1.06 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
on:
pull_request:
push:
branches: [main]
name: Run test suite
env:
RUST_VERSION: nightly-2022-09-13
jobs:
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_VERSION }}
override: true
- name: Cache packages
id: cache-cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ env.RUST_VERSION }}-${{ hashFiles('**/Cargo.lock') }}-test
restore-keys: |
${{ runner.os }}-cargo-${{ env.RUST_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo-${{ env.RUST_VERSION }}-
- name: test/release
uses: actions-rs/cargo@v1
with:
command: test
args: --release