-
Notifications
You must be signed in to change notification settings - Fork 13
48 lines (47 loc) · 2.33 KB
/
rust.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
on:
push:
branches:
- "**"
pull_request:
name: Check Code
jobs:
check_code:
strategy:
matrix:
config:
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu, gha_alias: 'Linux x64 - ' }
- { os: ubuntu-latest, target: aarch64-unknown-linux-gnu, gha_alias: 'Linux aarch64 - ' }
- { os: macos-13, target: x86_64-apple-darwin, gha_alias: 'macOS x64 - ' }
- { os: macos-latest, target: aarch64-apple-darwin, gha_alias: 'macOS aarch64 - ' }
- { os: windows-latest, target: x86_64-pc-windows-msvc, gha_alias: 'Windows x64 - ' }
cargo_cmd:
- { cmd_name: build, gha_alias: "Build - Profile 'debug'" }
- { cmd_name: test, args: '--workspace', gha_alias: "Test" }
include:
- config: { os: ubuntu-latest, target: aarch64-unknown-linux-gnu, gha_alias: '' }
cargo_cmd: { cmd_name: clippy, args: '', gha_alias: "Clippy" }
- config: { os: ubuntu-latest, target: aarch64-unknown-linux-gnu, gha_alias: '' }
cargo_cmd: { cmd_name: fmt, args: '--check', gha_alias: "Rustfmt" }
name: ${{ matrix.config.gha_alias }}${{ matrix.cargo_cmd.gha_alias }}
runs-on: ${{ matrix.config.os }}
env:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
DD_APP_KEY: ${{ secrets.DD_APP_KEY }}
DD_SITE: ${{ vars.DD_SITE }}
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rust-lang/[email protected]
- name: Run cargo ${{ matrix.cargo_cmd.cmd_name }} ${{ matrix.cargo_cmd.args }}
uses: actions-rs/cargo@v1
with:
command: ${{ matrix.cargo_cmd.cmd_name }}
args: ${{ matrix.cargo_cmd.args }}
- name: Check python rulesets - part1
run: cargo run --bin datadog-static-analyzer-test-ruleset -- -r python-best-practices -r python-security -r python-code-style -r python-inclusive
- name: Check python rulesets - part2
run: cargo run --bin datadog-static-analyzer-test-ruleset -- -r python-django -r python-flask -r python-design
- name: Check Java rulesets
run: cargo run --bin datadog-static-analyzer-test-ruleset -- -r java-security -r java-best-practices -r java-code-style
- name: Check Docker rulesets
run: cargo run --bin datadog-static-analyzer-test-ruleset -- -r docker-best-practices