Skip to content

Commit 3528aa6

Browse files
committed
Check third-party license file in CI
1 parent 1716535 commit 3528aa6

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

.github/ci.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
test:
14+
name: Run tests
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install Rust toolchain
20+
uses: dtolnay/rust-toolchain@stable
21+
22+
- name: Cache dependencies
23+
uses: actions/cache@v3
24+
with:
25+
path: |
26+
~/.cargo/registry
27+
~/.cargo/git
28+
target
29+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
30+
31+
- name: Run tests
32+
run: cargo test --verbose
33+
34+
formatting:
35+
name: Check formatting
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Install Rust toolchain
41+
uses: dtolnay/rust-toolchain@stable
42+
with:
43+
components: rustfmt
44+
45+
- name: Check formatting
46+
run: cargo fmt --all -- --check
47+
48+
clippy:
49+
name: Lint with Clippy
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Install Rust toolchain
55+
uses: dtolnay/rust-toolchain@stable
56+
with:
57+
components: clippy
58+
59+
- name: Cache dependencies
60+
uses: actions/cache@v3
61+
with:
62+
path: |
63+
~/.cargo/registry
64+
~/.cargo/git
65+
target
66+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
67+
68+
- name: Run Clippy
69+
run: cargo clippy -- -D warnings
70+
71+
3rdparty-license:
72+
name: Check Datadog third-party license file
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/checkout@v4
76+
77+
- name: Install Rust toolchain
78+
uses: dtolnay/rust-toolchain@stable
79+
80+
- name: Cache cargo tools
81+
uses: actions/cache@v3
82+
with:
83+
path: ~/.cargo/bin
84+
key: ${{ runner.os }}-cargo-tools-${{ hashFiles('**/Cargo.lock') }}
85+
86+
- name: Install rust-license-tool
87+
run: cargo install rust-license-tool
88+
89+
- name: Check Datadog third-party license file
90+
run: dd-rust-license-tool check

0 commit comments

Comments
 (0)