-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (55 loc) · 1.72 KB
/
Copy pathrust.yml
File metadata and controls
61 lines (55 loc) · 1.72 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
58
59
60
61
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call: # allow this workflow to be called from other workflows
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# selecting a toolchain either by action or manual `rustup` calls should happen
# before the plugin, as the cache uses the current rustc version as its cache key
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
cache-on-failure: "true"
- name: Print tool versions
run: |
rustc --version
cargo version
- name: Build
run: cargo build --verbose --locked
- name: Run tests
run: cargo test --verbose
- name: Lint
run: |
set -exuo pipefail
cargo fmt --all -- --check
cargo clippy -- -Dwarnings
- name: Install tool cargo-deny
uses: baptiste0928/cargo-install@f204293d9709061b7bc1756fec3ec4e2cd57dec0 # v3.4.0
with:
crate: cargo-deny
- name: Install tool cargo-outdated
uses: baptiste0928/cargo-install@f204293d9709061b7bc1756fec3ec4e2cd57dec0 # v3.4.0
with:
crate: cargo-outdated
version: 0.17.0
- name: Install tool cargo-pants
uses: baptiste0928/cargo-install@f204293d9709061b7bc1756fec3ec4e2cd57dec0 # v3.4.0
with:
crate: cargo-pants
- name: Check
run: |
set -exuo pipefail
cargo deny check
cargo outdated --exit-code 1
#cargo udeps
#rm -rf ~/.cargo/advisory-db
#cargo audit
cargo pants