-
Notifications
You must be signed in to change notification settings - Fork 36
96 lines (89 loc) · 2.21 KB
/
ci.yaml
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI workflow
on:
pull_request:
types: [ opened, synchronize, reopened ]
push:
branches:
- "develop"
- "master"
- "pkg/*"
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
jobs:
unit-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-12, windows-latest ]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.71.1
- if: matrix.os == 'windows-latest'
name: Windows Dependencies
shell: pwsh
run: |
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
scoop install mingw git
- name: UnitTest
run: |
make test
git diff
integration-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-12 ]
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.71.1
- name: Integration_Test
run: make integration
linters:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-12 ]
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.71.1
- name: Linters
run: |
cargo fmt --version || rustup component add rustfmt
cargo clippy --version || rustup component add clippy
make fmt
make clippy
git diff --exit-code Cargo.lock
security-audit:
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- --hide-inclusion-graph --show-stats advisories sources
- --hide-inclusion-graph --show-stats bans
- --hide-inclusion-graph --show-stats licenses
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.71.1
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}
ci-success:
name: ci
needs:
- unit-test
- integration-test
- linters
- security-audit
runs-on: ubuntu-latest
steps:
- name: CI succeeded
run: exit 0