forked from linkerd/linkerd2
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (74 loc) · 2.12 KB
/
policy_controller.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Policy Controller
on:
pull_request:
paths:
- 'Cargo.lock'
- 'Cargo.toml'
- 'deny.toml'
- 'rust-toolchain'
- 'policy-controller/**'
- '.github/workflows/policy_controller.yml'
permissions:
contents: read
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10
jobs:
fmt:
timeout-minutes: 5
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.0
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
audit:
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources
# Prevent sudden announcement of a new advisory from failing Ci.
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- uses: EmbarkStudios/cargo-deny-action@0ca727bbae7b7b578b9a5f98186caac35aa2a00d
with:
command: check bans licenses sources
clippy:
timeout-minutes: 5
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.0
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- run: rustup component add clippy
- run: cargo clippy --workspace --all-targets
check:
timeout-minutes: 20
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.0
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
# Check each crate independently to ensure its Cargo.toml is sufficient.
- run: |
for d in $(for toml in $(find . -mindepth 2 -name Cargo.toml) ; do echo ${toml%/*} ; done | sort -r )
do
echo "# $d"
(cd $d ; cargo check --all-targets)
done
test:
name: test
runs-on: ubuntu-latest
timeout-minutes: 15
container:
image: docker://rust:1.56.0
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- run: cargo test --workspace