Skip to content
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
4 changes: 0 additions & 4 deletions .github/workflows/all-green.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: Check Pull Request CI Status
on:
workflow_dispatch: # allow to trigger the workflow on main, to add it in suggestion on branch protection rules
pull_request:
types:
- opened
- synchronize
- reopened

permissions:
checks: read
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/appsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ on:
- 'appsec/**'
- 'contrib/**/appsec.go'
- '**/go.mod'
merge_group:
push:
branches: release-v*
branches:
- release-v*
tags-ignore:
- 'contrib/**'
- 'instrumentation/**'

- 'internal/**'
- 'orchestrion/**'
- 'scripts/**'
env:
DD_APPSEC_WAF_TIMEOUT: 1m
GOEXPERIMENT: synctest # TODO: remove once go1.25 is the minimum supported version
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,9 @@ on:
required: true
type: string
push:
branches: [ main, master ]
tags-ignore:
- 'contrib/**'
- 'instrumentation/**'
branches:
- mq-working-branch-**
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
merge_group:

jobs:
analyze:
name: Analyze
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ecosystems-label-pr.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Label APM Ecosystems Pull Requests
on:
pull_request:
paths:
- "contrib/**"
types:
- opened
- reopened
- edited
paths:
- "contrib/**"
permissions:
contents: read
pull-requests: write
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ name: Generate
on:
push:
branches:
- main
- release-*
- mq-working-branch-**
pull_request:
branches:
- main
- release-*
workflow_call:
inputs:
go-version:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ on:
type: string
push:
branches:
- main
- release-v*
- mq-working-branch-**
tags-ignore:
- 'contrib/**'
- 'instrumentation/**'
- 'internal/**'
- 'orchestrion/**'
- 'scripts/**'
schedule:
- cron: '00 00 * * *'
workflow_dispatch:
Expand Down
35 changes: 9 additions & 26 deletions .github/workflows/main-branch-tests.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,27 @@
name: Main Branch and Release Tests

on:
workflow_call: # allows to reuse this workflow
inputs:
ref:
description: 'The branch to run the workflow on'
required: true
type: string
push:
branches:
- main
- release-v*
- mq-working-branch-**
tags-ignore:
- 'contrib/**'
- 'instrumentation/**'
- 'internal/**'
- 'orchestrion/**'
- 'scripts/**'

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

jobs:
unit-integration-tests:
strategy:
matrix:
go-version: [ "1.25", "1.24" ]
fail-fast: false
uses: ./.github/workflows/unit-integration-tests.yml
permissions:
contents: read
id-token: write
pull-requests: write
with:
go-version: ${{ matrix.go-version }}
ref: ${{ inputs.ref || github.ref }}
secrets: inherit
multios-unit-tests:
strategy:
matrix:
runs-on: [ macos-latest, windows-latest, ubuntu-latest ]
go-version: [ "1.25", "1.24" ]
fail-fast: false
uses: ./.github/workflows/multios-unit-tests.yml
with:
go-version: ${{ matrix.go-version }}
runs-on: ${{ matrix.runs-on }}
ref: ${{ inputs.ref || github.ref }}
secrets: inherit
go-version: "1.25" # Should be the highest supported version of Go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be neat if that supported the stable alias?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That introduces the "risk" of having red CI if a new Go release causes the pipeline to fail. I prefer to have control, in the same line of the previous point about stating explicitly configs equivalent to the defaults.

20 changes: 10 additions & 10 deletions .github/workflows/multios-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ on:
workflow_dispatch: # manually
inputs:
go-version:
description: The Go version to use
required: true
type: string
runs-on:
required: true
type: string
ref:
description: 'The branch to run the workflow on'
description: The OS to run the tests on
required: true
type: string
workflow_call:
Expand All @@ -21,10 +19,6 @@ on:
runs-on:
required: true
type: string
ref:
description: 'The branch to run the workflow on'
required: true
type: string

env:
DD_APPSEC_WAF_TIMEOUT: 1m # Increase time WAF time budget to reduce CI flakiness
Expand All @@ -51,10 +45,16 @@ jobs:
shell: pwsh
run: |
"normalized_workspace=${{ github.workspace }}" >> $env:GITHUB_ENV
- name: Restore repo cache
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: .git
key: gitdb-${{ github.repository_id }}-${{ github.sha }}
Comment on lines +48 to +52
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary? How is downloading the cache any faster than downloading the repo itself?

Maybe consider doing a shallow-clone instead?

Copy link
Member Author

@darccio darccio Aug 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already a shallow clone. The idea behind this is to collocate the data - the repo - closer to the runner. As we are blasting hundreds of requests against multiple providers - GitHub, Docker - when running multiple PR's CI in parallel, we face network issues.

It's also reused across children jobs in the same pipeline, thus reducing the number of pulls.

Pulling repositories incur in network traffic, as GitHub doesn't seem to optimize anything. Caching the repo allows us to divert that load against a subsystem that is better designed for this kind of usage. There is another PR in progress for caching Docker images: #3910

- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v2.7.0
with:
ref: ${{ inputs.ref || github.ref }}
ref: ${{ github.sha }}
clean: false
- name: Setup Go and development tools
uses: ./.github/actions/setup-go
with:
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Mac OS Coreutils
if: inputs.runs-on == 'macos-latest'
run: brew install coreutils
- name: "Runner ${{ matrix.runner-index }}: Test Core and Contrib (No Integration Tests)"
- name: "Runner: Test Core and Contrib (No Integration Tests)"
shell: bash
run: |
export PATH="${{ github.workspace }}/bin:${PATH}"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/orchestrion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ on:
DD_API_KEY:
required: false
pull_request:
merge_group:
push:
branches:
- release-v*
tags-ignore:
- 'contrib/**'
- 'instrumentation/**'
- 'internal/**'
- 'orchestrion/**'
- 'scripts/**'

permissions: read-all

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/parametric-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ on:
type: string
push:
branches:
- main
- release-v*
- mq-working-branch-**
tags-ignore:
- 'contrib/**'
- 'instrumentation/**'
- 'internal/**'
- 'orchestrion/**'
- 'scripts/**'
pull_request:
branches:
- "**"
merge_group:
workflow_dispatch:
inputs:
ref:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pull-request-title-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: Validate PR Title

on:
pull_request:
types: [opened, edited,reopened,synchronize]
types:
- opened
- edited
- reopened
- synchronize

jobs:
check-title:
Expand Down
65 changes: 50 additions & 15 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,64 @@ name: Pull Request Tests

on:
pull_request:
branches:
- "**"
merge_group:
push:
branches:
- 'mq-working-branch-**'
tags-ignore:
- 'contrib/**'
- 'instrumentation/**'

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

jobs:
warm-repo-cache:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Cache
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: .git
key: gitdb-${{ github.repository_id }}-${{ github.sha }}
unit-integration-tests:
name: PR Unit and Integration Tests
needs:
- warm-repo-cache
strategy:
matrix:
go-version: [ "1.24", "1.25" ]
fail-fast: false
uses: ./.github/workflows/unit-integration-tests.yml
permissions:
contents: read
id-token: write
pull-requests: write
with:
go-version: "1.24"
ref: ${{ github.ref }}
go-version: ${{ matrix.go-version }}
secrets: inherit
multios-unit-tests:
needs:
- warm-repo-cache
strategy:
matrix:
runs-on: [ macos-latest, windows-latest, ubuntu-latest ]
go-version: [ "1.24", "1.25" ]
fail-fast: false
uses: ./.github/workflows/multios-unit-tests.yml
with:
go-version: ${{ matrix.go-version }}
runs-on: ${{ matrix.runs-on }}
secrets: inherit
# This is a simple join point to make it easy to set up branch protection rules in GitHub.
pull-request-tests-done:
name: PR Unit and Integration Tests / ${{ matrix.name }}
strategy:
matrix:
name: [ "test-contrib", "test-core" ]
needs:
- unit-integration-tests
- multios-unit-tests
runs-on: ubuntu-latest
if: success() || failure()
steps:
- name: Success
if: needs.unit-integration-tests.result == 'success' && needs.multios-unit-tests.result == 'success'
run: echo "Success!"
- name: Failure
if: needs.unit-integration-tests.result != 'success' || needs.multios-unit-tests.result != 'success'
run: echo "Failure!" && exit 1
7 changes: 4 additions & 3 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ on:
type: string
push:
branches:
- main
- release-v*
- mq-working-branch-**
tags-ignore:
- 'contrib/**'
- 'instrumentation/**'
- 'internal/**'
- 'orchestrion/**'
- 'scripts/**'
schedule: # nightly
- cron: "0 0 * * *"
workflow_dispatch: { } # manually
pull_request:
branches:
- '**'

env:
TEST_RESULTS: /tmp/test-results # path to where test results will be saved
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ name: Static Checks
on:
push:
branches:
- main
- release-*
- mq-working-branch-**
tags-ignore:
- 'contrib/**'
- 'instrumentation/**'
- 'internal/**'
- 'orchestrion/**'
- 'scripts/**'
pull_request:
branches:
- main
- release-*
workflow_call:
inputs:
go-version:
Expand Down
Loading
Loading