Skip to content

Commit 258f0db

Browse files
authored
Merge pull request #4328 from DataDog/tonycthsu/consolidate-checks
Aggregate checks
2 parents 38023b1 + b2893dd commit 258f0db

File tree

3 files changed

+69
-52
lines changed

3 files changed

+69
-52
lines changed

Diff for: .github/workflows/check.yml

+69-6
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,43 @@ name: Check
22
on:
33
push:
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
59
jobs:
10+
build:
11+
runs-on: ubuntu-24.04
12+
container: ghcr.io/datadog/images-rb/engines/ruby:3.3
13+
steps:
14+
- uses: actions/checkout@v4
15+
- run: bundle lock
16+
- uses: actions/upload-artifact@v4
17+
id: lockfile
18+
with:
19+
name: 'check-lockfile-${{ github.sha }}-${{ github.run_id }}'
20+
path: '*.lock'
21+
if-no-files-found: error
22+
623
lint:
7-
runs-on: ubuntu-22.04
8-
container:
9-
image: ghcr.io/datadog/images-rb/engines/ruby:3.2
24+
needs: ['build']
25+
runs-on: ubuntu-24.04
26+
container: ghcr.io/datadog/images-rb/engines/ruby:3.3
1027
steps:
1128
- uses: actions/checkout@v4
29+
- uses: actions/download-artifact@v4
1230
- name: Install dependencies
1331
run: bundle install
1432
- run: bundle exec rake rubocop standard
1533

1634
check:
1735
name: Check types
18-
runs-on: ubuntu-22.04
19-
container:
20-
image: ghcr.io/datadog/images-rb/engines/ruby:3.2
36+
needs: ['build']
37+
runs-on: ubuntu-24.04
38+
container: ghcr.io/datadog/images-rb/engines/ruby:3.3
2139
steps:
2240
- uses: actions/checkout@v4
41+
- uses: actions/download-artifact@v4
2342
- name: Install dependencies
2443
run: bundle install
2544
- name: Check for stale signature files
@@ -30,3 +49,47 @@ jobs:
3049
run: bundle exec rake steep:check
3150
- name: Record stats
3251
run: bundle exec rake steep:stats[md] >> $GITHUB_STEP_SUMMARY
52+
53+
# Dogfooding Datadog SBOM Analysis
54+
dd-software-composition-analysis:
55+
needs: ['build']
56+
runs-on: ubuntu-24.04
57+
container: ghcr.io/datadog/images-rb/engines/ruby:3.3
58+
name: Datadog SBOM Generation and Upload
59+
steps:
60+
- name: Checkout
61+
uses: actions/checkout@v4
62+
- uses: actions/download-artifact@v4
63+
- name: Check imported libraries are secure and compliant
64+
id: datadog-software-composition-analysis
65+
uses: DataDog/datadog-sca-github-action@main
66+
with:
67+
dd_api_key: ${{ secrets.DD_API_KEY }}
68+
dd_app_key: ${{ secrets.DD_APP_KEY }}
69+
dd_site: datadoghq.com
70+
71+
# Dogfooding Datadog Static Analysis
72+
dd-static-analysis:
73+
runs-on: ubuntu-24.04
74+
name: Datadog Static Analyzer
75+
steps:
76+
- name: Checkout
77+
uses: actions/checkout@v4
78+
- name: Check code meets quality and security standards
79+
id: datadog-static-analysis
80+
uses: DataDog/datadog-static-analyzer-github-action@v1
81+
with:
82+
dd_api_key: ${{ secrets.DD_API_KEY }}
83+
dd_app_key: ${{ secrets.DD_APP_KEY }}
84+
dd_site: datadoghq.com
85+
cpu_count: 2
86+
87+
check-result:
88+
needs:
89+
- 'check'
90+
- 'lint'
91+
- 'dd-software-composition-analysis'
92+
- 'dd-static-analysis'
93+
runs-on: ubuntu-24.04
94+
steps:
95+
- run: echo "Done"

Diff for: .github/workflows/datadog-sca.yml

-25
This file was deleted.

Diff for: .github/workflows/datadog-static-analysis.yml

-21
This file was deleted.

0 commit comments

Comments
 (0)