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

[DO NOT MERGE] Testing quality gates #3137

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
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
10 changes: 10 additions & 0 deletions .github/actions/dd-ci-upload/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ inputs:
dd-api-key:
required: true
description: Datadog API key to use to upload the junit files
dd-app-key:
required: true
description: Datadog APP key to use to access quality gates
service:
required: false
default: dd-trace-go
Expand Down Expand Up @@ -53,3 +56,10 @@ runs:
--service ${{ inputs.service }} \
--tags "${{ inputs.tags }}" \
${{ inputs.files }}

- name: Activate Quality Gates
shell: bash
env:
DD_API_KEY: ${{ inputs.dd-api-key }}
DD_APP_KEY: ${{ inputs.dd-app-key }}
run: ./datadog-ci gate evaluate
1 change: 1 addition & 0 deletions .github/workflows/multios-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
uses: ./.github/actions/dd-ci-upload
with:
dd-api-key: ${{ secrets.DD_CI_API_KEY }}
dd-app-key: ${{ secrets.DD_CI_APP_KEY }}
files: ${{ env.REPORT }}
tags: go:${{ inputs.go-version }},arch:${{ runner.arch }},os:${{ runner.os }},distribution:${{ runner.distribution }}

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unit-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ jobs:
uses: ./.github/actions/dd-ci-upload
with:
dd-api-key: ${{ secrets.DD_CI_API_KEY }}
dd-app-key: ${{ secrets.DD_CI_APP_KEY }}
files: ${{ env.TEST_RESULTS }}/gotestsum-report*.xml
tags: go:${{ inputs.go-version }},arch:${{ runner.arch }},os:${{ runner.os }},distribution:${{ runner.distribution }}

Expand Down Expand Up @@ -330,6 +331,7 @@ jobs:
uses: ./.github/actions/dd-ci-upload
with:
dd-api-key: ${{ secrets.DD_CI_API_KEY }}
dd-app-key: ${{ secrets.DD_CI_APP_KEY }}
files: ${{ env.TEST_RESULTS }}/gotestsum-report.xml ${{ env.TEST_RESULTS }}/gotestsum-report-exectrace.xml
tags: go:${{ inputs.go-version }}},arch:${{ runner.arch }},os:${{ runner.os }},distribution:${{ runner.distribution }}
- name: Upload Coverage
Expand Down
9 changes: 9 additions & 0 deletions ddtrace/tracer/tracer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"errors"
"fmt"
"io"
"math/rand"
"net/http"
"net/http/httptest"
"os"
Expand Down Expand Up @@ -75,6 +76,14 @@ var (
integration bool
)

// This test is meant to flake. We are using this to test quality gates.
// TODO : REMOVE THIS TEST BEFORE MERGING
func TestNewFlaky(t *testing.T) {
n := rand.Intn(3)
assert.Equal(t, n, 0)

}

func TestMain(m *testing.M) {
if maininternal.BoolEnv("DD_APPSEC_ENABLED", false) {
// things are slower with AppSec; double wait times
Expand Down
Loading