Skip to content

Commit 4d0cfdb

Browse files
cbeauchesnejuan-fernandez
authored andcommitted
chore (ci): report test result to datadog (#6649)
* Add junit job for mocha * mocha multi reporter * Licences * yarn dependencies:dedupe * Activate push to test optimization on system-tests * Introduce and deploy push-junit * Use good env var names * Add --service dd-trace-js-tests * fix lint * Use good secret * Remove push-junit * Use DataDog/junit-upload-github-action * push platform tests to test optim * Set api key for system-tests * mocha configuration * Deploy on all jobs * Fix typo * Lint * fix esbuild cwd * Removes a leftover in gitignore
1 parent fe2d7a6 commit 4d0cfdb

File tree

23 files changed

+603
-40
lines changed

23 files changed

+603
-40
lines changed

.github/actions/instrumentations/test/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Instrumentation Tests
22
description: Run instrumentation tests
3+
inputs:
4+
dd_api_key:
5+
description: DD_API_KEY used to push test results
6+
required: true
37
runs:
48
using: composite
59
steps:
@@ -11,3 +15,8 @@ runs:
1115
- run: yarn test:instrumentations:ci
1216
shell: bash
1317
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
18+
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
19+
if: always()
20+
with:
21+
api_key: ${{ inputs.dd_api_key }}
22+
service: dd-trace-js-tests

.github/actions/plugins/test-and-upstream/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Plugin and Upstream Tests
22
description: Run plugin tests and upstream test suite
3+
inputs:
4+
dd_api_key:
5+
description: DD_API_KEY used to push test results
6+
required: true
37
runs:
48
using: composite
59
steps:
@@ -20,3 +24,8 @@ runs:
2024
uses: ./.github/actions/testagent/logs
2125
with:
2226
suffix: test-and-upstream-${{ github.job }}
27+
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
28+
if: always()
29+
with:
30+
api_key: ${{ inputs.dd_api_key }}
31+
service: dd-trace-js-tests

.github/actions/plugins/test/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Plugin Tests
22
description: Run plugin tests
3+
inputs:
4+
dd_api_key:
5+
description: DD_API_KEY used to push test results
6+
required: true
37
runs:
48
using: composite
59
steps:
@@ -16,3 +20,8 @@ runs:
1620
uses: ./.github/actions/testagent/logs
1721
with:
1822
suffix: test-${{ github.job }}
23+
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
24+
if: always()
25+
with:
26+
api_key: ${{ inputs.dd_api_key }}
27+
service: dd-trace-js-tests

.github/actions/plugins/upstream/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Plugin Upstream Tests
22
description: Run upstream test suite
3+
inputs:
4+
dd_api_key:
5+
description: DD_API_KEY used to push test results
6+
required: true
37
runs:
48
using: composite
59
steps:
@@ -16,3 +20,8 @@ runs:
1620
uses: ./.github/actions/testagent/logs
1721
with:
1822
suffix: upstream-${{ github.job }}
23+
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
24+
if: always()
25+
with:
26+
api_key: ${{ inputs.dd_api_key }}
27+
service: dd-trace-js-tests

.github/workflows/aiguard.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
- uses: ./.github/actions/install
2525
- run: yarn test:aiguard:ci
2626
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
27+
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
28+
if: always()
29+
with:
30+
api_key: ${{ secrets.DD_API_KEY }}
31+
service: dd-trace-js-tests
2732

2833
ubuntu:
2934
runs-on: ubuntu-latest
@@ -50,6 +55,11 @@ jobs:
5055
cache: 'true'
5156
- run: yarn test:aiguard:ci
5257
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
58+
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
59+
if: always()
60+
with:
61+
api_key: ${{ secrets.DD_API_KEY }}
62+
service: dd-trace-js-tests
5363

5464
integration:
5565
strategy:
@@ -63,3 +73,8 @@ jobs:
6373
with:
6474
version: ${{ matrix.version }}
6575
- run: yarn test:integration:aiguard
76+
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
77+
if: always()
78+
with:
79+
api_key: ${{ secrets.DD_API_KEY }}
80+
service: dd-trace-js-tests

.github/workflows/apm-capabilities.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ jobs:
2323
- uses: ./.github/actions/install
2424
- run: yarn test:trace:core:ci
2525
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
26+
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
27+
if: always()
28+
with:
29+
api_key: ${{ secrets.DD_API_KEY }}
30+
service: dd-trace-js-tests
2631

2732
tracing-ubuntu:
2833
runs-on: ubuntu-latest
@@ -38,6 +43,11 @@ jobs:
3843
- uses: ./.github/actions/node/latest
3944
- run: yarn test:trace:core:ci
4045
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
46+
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
47+
if: always()
48+
with:
49+
api_key: ${{ secrets.DD_API_KEY }}
50+
service: dd-trace-js-tests
4151

4252
tracing-windows:
4353
runs-on: windows-latest
@@ -49,3 +59,8 @@ jobs:
4959
cache: 'true'
5060
- run: yarn test:trace:core:ci
5161
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
62+
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
63+
if: always()
64+
with:
65+
api_key: ${{ secrets.DD_API_KEY }}
66+
service: dd-trace-js-tests

0 commit comments

Comments
 (0)