-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (31 loc) · 934 Bytes
/
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
name: Test
on:
workflow_call:
inputs:
cache-key:
required: true
type: string
workflow_dispatch:
env:
CARGO_CACHE_KEY: ${{ inputs.cache-key || 'default-cache-key-if-none-provided' }}
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repo and submodules
uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
with:
submodules: true
- uses: actions-rust-lang/setup-rust-toolchain@1fbea72663f6d4c03efaab13560c8a24cfd2a7cc # v1.9.0
- uses: actions/cache@81382a721fc89d96eca335d0c3ba33144b2baa9d # v4.0.2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
~/.cargo/bin
key: ${{ env.CARGO_CACHE_KEY }}
id: cache-cargo-test
- name: Cargo test
run: cargo test --release --workspace --all-targets --all-features