-
Notifications
You must be signed in to change notification settings - Fork 484
chore(.github/workflowsw): move main CI checks to merge queue runs
#3887
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
Changes from all commits
3cb86c0
4baab01
de74ca2
966c56a
d70bde3
957c7cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | ||
|
|
@@ -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 | ||
|
|
@@ -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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: | ||
|
|
@@ -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}" | ||
|
|
||
There was a problem hiding this comment.
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
stablealias?There was a problem hiding this comment.
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.