Skip to content

Commit 2b41ac6

Browse files
authored
ci: Add DataDog tracing (#163)
1 parent 7a7f664 commit 2b41ac6

File tree

1 file changed

+37
-4
lines changed

1 file changed

+37
-4
lines changed

.github/workflows/coder.yaml

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,49 @@ jobs:
155155
terraform_wrapper: false
156156

157157
- name: Test with Mock Database
158-
run: gotestsum --jsonfile="gotests.json" --packages="./..." --
159-
-covermode=atomic -coverprofile="gotests.coverage" -timeout=3m
160-
-count=5 -race -short -parallel=2
158+
run: gotestsum --junitfile="gotests.xml" --packages="./..." --
159+
-covermode=atomic -coverprofile="gotests.coverage"
160+
-timeout=3m -count=5 -race -short -parallel=2
161161

162162
- name: Test with PostgreSQL Database
163163
if: runner.os == 'Linux'
164-
run: DB=true gotestsum --jsonfile="gotests.json" --packages="./..." --
164+
run: DB=true gotestsum --junitfile="gotests.xml" --packages="./..." --
165165
-covermode=atomic -coverprofile="gotests.coverage" -timeout=3m
166166
-count=1 -race -parallel=2
167167

168+
- uses: actions/setup-node@v2
169+
if: always() && github.actor != 'dependabot[bot]'
170+
with:
171+
node-version: "14"
172+
173+
- name: Cache DataDog CI
174+
if: always() && github.actor != 'dependabot[bot]'
175+
uses: actions/cache@v2
176+
with:
177+
path: |
178+
~/.npm
179+
%LocalAppData%\npm-cache
180+
key: datadogci-
181+
restore-keys: datadogci-
182+
183+
- name: Upload DataDog Trace
184+
if: always() && github.actor != 'dependabot[bot]'
185+
# See: https://docs.datadoghq.com/continuous_integration/setup_tests/junit_upload/#collecting-environment-configuration-metadata
186+
env:
187+
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
188+
DD_GIT_REPOSITORY_URL: ${{ github.repositoryUrl }}
189+
DD_GIT_BRANCH: ${{ github.head_ref }}
190+
DD_GIT_COMMIT_SHA: ${{ github.sha }}
191+
DD_GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
192+
DD_GIT_COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
193+
DD_GIT_COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
194+
DD_GIT_COMMIT_COMMITTER_NAME: ${{ github.event.head_commit.committer.name }}
195+
DD_GIT_COMMIT_COMMITTER_EMAIL: ${{ github.event.head_commit.committer.email }}
196+
DD_TAGS: ${{ format('os.platform:{0},os.architecture:{1}', runner.os, runner.arch) }}
197+
run: |
198+
npm install -g @datadog/datadog-ci
199+
datadog-ci junit upload --service coder gotests.xml
200+
168201
- uses: codecov/codecov-action@v2
169202
if: github.actor != 'dependabot[bot]'
170203
with:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy