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

Add Test Optimization #1253

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
14 changes: 12 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ jobs:

- name: Build
run: go build ./...


- name: Install orchestrion
run: |
go install github.com/DataDog/[email protected]
orchestrion pin

- name: Test
run: go test -v $(go list ./... | grep -v /integration-tests) # We do not run integration-tests here because they require more tooling (Pulumi, invoke, ..). They will be run in a dedicated job
run: orchestrion go test -v $(go list ./... | grep -v /integration-tests) # We do not run integration-tests here because they require more tooling (Pulumi, invoke, ..). They will be run in a dedicated job
env:
DD_CIVISIBILITY_ENABLED: true
DD_CIVISIBILITY_AGENTLESS_ENABLED: true
DD_ENV: ci
DD_API_KEY: ${{ secrets.DATADOG_API_KEY }}
8 changes: 7 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,20 @@ integration-testing:
- chmod 400 $E2E_PRIVATE_KEY_PATH
- ssh-add $E2E_PRIVATE_KEY_PATH
- pip install -r requirements.txt
- go install github.com/DataDog/[email protected]
- orchestrion pin
- export DD_CIVISIBILITY_ENABLED=true
- export DD_CIVISIBILITY_AGENTLESS_ENABLED=true
- export DD_ENV=ci
- export DD_API_KEY=$(vault kv get -field=api_key kv/k8s/gitlab-runner/test-infra-definitions/dd-token)
script:
- |
if [ ! -f ./dist/main ]; then
echo "no main binary found, please run 'build-pulumi-go-main' job"
exit 1
fi
# execute test from dist directory to use the generated binary
- go test ./integration-tests -v -timeout 0s -workingDir=dist
- orchestrion go test ./integration-tests -v -timeout 0s -workingDir=dist
variables:
E2E_PUBLIC_KEY_PATH: /tmp/agent-integration-test-ssh-key.pub
E2E_PRIVATE_KEY_PATH: /tmp/agent-integration-test-ssh-key
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/DataDog/test-infra-definitions

go 1.22.5
go 1.22.8

require (
dario.cat/mergo v1.0.1
Expand Down