-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (60 loc) · 1.68 KB
/
rust.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Rust PR
on:
pull_request: {}
jobs:
## Required builds
# Ensures we don't take unintended dependencies.
audit:
timeout-minutes: 5
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: EmbarkStudios/cargo-deny-action@b655a95dbfd6f1dacd48f7e869cb37cf4f03a6d9
with:
command: check bans licenses sources
# Prevent sudden announcement of a new advisory from failing Ci.
advisories:
timeout-minutes: 5
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: EmbarkStudios/cargo-deny-action@b655a95dbfd6f1dacd48f7e869cb37cf4f03a6d9
with:
command: check advisories
# Linting
clippy:
timeout-minutes: 5
runs-on: ubuntu-latest
container:
image: docker://rust:1.52.1-buster
permissions:
contents: read
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- run: rustup component add clippy
- run: cargo clippy --all-targets
# Enforce automated formatting.
fmt:
timeout-minutes: 5
runs-on: ubuntu-latest
container:
image: docker://rust:1.52.1-buster
permissions:
contents: read
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- run: rustup component add rustfmt
- run: cargo fmt -- --check
# Run all tests.
test:
timeout-minutes: 15
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- run: cargo test