-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (38 loc) · 1.03 KB
/
cargo_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
42
on:
push:
paths:
- "**.rs"
- "**.pest"
name: Cargo Test
env:
CARGO_TERM_COLOR: always
CI: true # insta will not write new snapshot files
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
# Checkout the project
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: "${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}"
- uses: actions/cache@v4
with:
path: ~/.cargo/git
key: "${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}"
- uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
# Run cargo test
- name: Test
run: cargo test --all-features