-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check third-party license file in CI
- Loading branch information
Showing
1 changed file
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
test: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Run tests | ||
run: cargo test --verbose | ||
|
||
formatting: | ||
name: Check formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
|
||
- name: Check formatting | ||
run: cargo fmt --all -- --check | ||
|
||
clippy: | ||
name: Lint with Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Run Clippy | ||
run: cargo clippy -- -D warnings | ||
|
||
3rdparty-license: | ||
name: Check Datadog third-party license file | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Cache cargo tools | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cargo/bin | ||
key: ${{ runner.os }}-cargo-tools-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install rust-license-tool | ||
run: cargo install rust-license-tool | ||
|
||
- name: Check Datadog third-party license file | ||
run: dd-rust-license-tool check |