Skip to content
Draft
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
23 changes: 20 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
strategy:
matrix:
os: ['macos-latest', 'ubuntu-latest', 'windows-2025']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
Expand All @@ -61,7 +62,11 @@ jobs:
key: go-${{ hashFiles('go.mod') }}
restore-keys: |
go-
- run: go test -v -race ./...
- run: go test -v -race ./... 2>&1 | tee test.output
- uses: ./.github/workflows/test-report
with:
job_name: ${{ github.job }}-${{ matrix.os }}
token: ${{ secrets.MERGIFY_TOKEN }}

test-integration-server-internal:
runs-on: ubuntu-latest
Expand All @@ -87,7 +92,10 @@ jobs:
EC_REGION: "gcp-us-west2"
# run integrationservertest/internal tests
# integrationservertest themselves are run in the integration-server-test pipeline
run: cd ./integrationservertest && go test -v -race ./internal/...
run: cd ./integrationservertest && go test -v -race ./internal/... 2>&1 | tee ../test.output
- uses: ./.github/workflows/test-report
with:
token: ${{ secrets.MERGIFY_TOKEN }}

test-fips:
runs-on: ubuntu-latest
Expand All @@ -108,7 +116,10 @@ jobs:
GOFIPS140: "latest"
# TODO: disable X25519MLKEM768 until upstream go issue is fixed https://github.com/golang/go/issues/74630#issuecomment-3224191006
GODEBUG: "fips140=only,tlsmlkem=0"
run: go test -v -race -tags=requirefips ./...
run: go test -v -race -tags=requirefips ./... 2>&1 | tee test.output
- uses: ./.github/workflows/test-report
with:
token: ${{ secrets.MERGIFY_TOKEN }}

system-test:
runs-on: ubuntu-latest
Expand All @@ -130,6 +141,9 @@ jobs:
GOTESTFLAGS: "-v"
GH_TOKEN: ${{ github.token }}
run: make system-test
- uses: ./.github/workflows/test-report
with:
token: ${{ secrets.MERGIFY_TOKEN }}

system-test-fips:
runs-on: ubuntu-latest
Expand All @@ -154,6 +168,9 @@ jobs:
GODEBUG: "fips140=only,tlsmlkem=0"
GH_TOKEN: ${{ github.token }}
run: make system-test
- uses: ./.github/workflows/test-report
with:
token: ${{ secrets.MERGIFY_TOKEN }}

test-package:
runs-on: ubuntu-latest
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/test-report/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: test-report
description: upload test results to Mergify

inputs:
token:
description: 'The mergify token'
required: true
job_name:
description: 'The name of the job'
required: false
default: ${{ github.job }}

runs:
using: composite
steps:
- run: |
go install github.com/jstemmer/go-junit-report@latest
cat test.output | go-junit-report | tee "junit-${job_name}.xml"
shell: bash
env:
job_name: ${{ inputs.job_name }}

- uses: actions/upload-artifact@v4
with:
name: junit-${{ inputs.job_name }}
path: "junit-${{ inputs.job_name }}.xml"
if-no-files-found: error

- name: Mergify CI Upload
if: (success() || failure()) && github.event_name != 'pull_request' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false )
uses: mergifyio/gha-mergify-ci@6875ab3991ec1db831576df1cd00a7870603aa9e # v8
with:
token: ${{ inputs.token }}
report_path: "junit-*.xml"
job_name: ${{ inputs.job_name }}
# NOTE: only for testing Mergify CI insights
env:
GITHUB_REF_NAME: main
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ test:
system-test:
# CGO is disabled when building APM Server binary, so the race detector in this case
# would only work on the parts that don't involve APM Server binary.
@(cd systemtest; go test $(GOMODFLAG) $(GOTESTFLAGS) -race -timeout=20m ./...)
@(cd systemtest; go test $(GOMODFLAG) $(GOTESTFLAGS) -race -timeout=20m ./... 2>&1 | tee ../test.output)

.PHONY:
clean:
Expand Down
Loading