Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregate checks #4328

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 69 additions & 6 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,43 @@ name: Check
on:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-24.04
container: ghcr.io/datadog/images-rb/engines/ruby:3.3
steps:
- uses: actions/checkout@v4
- run: bundle lock
- uses: actions/upload-artifact@v4
id: lockfile
with:
name: 'check-lockfile-${{ github.sha }}-${{ github.run_id }}'
path: '*.lock'
if-no-files-found: error

lint:
runs-on: ubuntu-22.04
container:
image: ghcr.io/datadog/images-rb/engines/ruby:3.2
needs: ['build']
runs-on: ubuntu-24.04
container: ghcr.io/datadog/images-rb/engines/ruby:3.3
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Install dependencies
run: bundle install
- run: bundle exec rake rubocop standard

check:
name: Check types
runs-on: ubuntu-22.04
container:
image: ghcr.io/datadog/images-rb/engines/ruby:3.2
needs: ['build']
runs-on: ubuntu-24.04
container: ghcr.io/datadog/images-rb/engines/ruby:3.3
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Install dependencies
run: bundle install
- name: Check for stale signature files
Expand All @@ -30,3 +49,47 @@ jobs:
run: bundle exec rake steep:check
- name: Record stats
run: bundle exec rake steep:stats[md] >> $GITHUB_STEP_SUMMARY

# Dogfooding Datadog SBOM Analysis
dd-software-composition-analysis:
needs: ['build']
runs-on: ubuntu-24.04
container: ghcr.io/datadog/images-rb/engines/ruby:3.3
name: Datadog SBOM Generation and Upload
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Check imported libraries are secure and compliant
id: datadog-software-composition-analysis
uses: DataDog/datadog-sca-github-action@main
with:
dd_api_key: ${{ secrets.DD_API_KEY }}
dd_app_key: ${{ secrets.DD_APP_KEY }}
dd_site: datadoghq.com

# Dogfooding Datadog Static Analysis
dd-static-analysis:
runs-on: ubuntu-24.04
name: Datadog Static Analyzer
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check code meets quality and security standards
id: datadog-static-analysis
uses: DataDog/datadog-static-analyzer-github-action@v1
with:
dd_api_key: ${{ secrets.DD_API_KEY }}
dd_app_key: ${{ secrets.DD_APP_KEY }}
dd_site: datadoghq.com
cpu_count: 2

check-result:
needs:
- 'check'
- 'lint'
- 'dd-software-composition-analysis'
- 'dd-static-analysis'
runs-on: ubuntu-24.04
steps:
- run: echo "Done"
25 changes: 0 additions & 25 deletions .github/workflows/datadog-sca.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/datadog-static-analysis.yml

This file was deleted.

Loading