Repository navigation
57 lines (44 loc) · 1.67 KB
/
Copy pathtest.yml
File metadata and controls
57 lines (44 loc) · 1.67 KB
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
name: tests
permissions:
contents: read
on:
pull_request:
merge_group:
push:
branches: [main]
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
cargo-next-test:
name: Cargo test
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1
with:
egress-policy: audit
- name: Fetch Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Install stable toolchain
uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@908c540300062bd5a7e473851cdb4282204cee09 # v1.9.1
- name: Cache cargo-nextest binary
id: cache-cargo-nextest
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cargo/bin/cargo-nextest
key: ${{ runner.os }}-cargo-nextest-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-nextest
if: steps.cache-cargo-nextest.outputs.cache-hit != 'true'
uses: taiki-e/install-action@ab6895351a88b908e96a4697860d4ffea5e57dbe # v2.87.27
with:
tool: cargo-nextest
- name: Cargo test
run: cargo nextest run --locked --all-targets --all-features --no-tests=pass --no-fail-fast
# https://github.com/rust-lang/cargo/issues/6669
- name: Run doc tests
run: cargo test --locked --doc --all-features --no-fail-fast