From c5bcf9048a749ed48f2f50a79ac290fa4de4ad5b Mon Sep 17 00:00:00 2001 From: LoneRifle Date: Fri, 6 Sep 2024 17:41:34 +0800 Subject: [PATCH] build(ci): add dd observability to tests --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23196c91..b203fd95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,20 @@ jobs: ${{ runner.OS }}-node- ${{ runner.OS }}- - run: npm ci + - name: Configure Datadog Test Visibility + env: + DD_SERVICE_NAME: ${{ secrets.DD_SERVICE_NAME }} + DD_API_KEY: ${{ secrets.DD_API_KEY }} + if: env.DD_SERVICE_NAME != '' && env.DD_API_KEY != '' + uses: datadog/test-visibility-github-action@v1 + with: + languages: js + service-name: ${{ secrets.DD_SERVICE_NAME }} + api-key: ${{ secrets.DD_API_KEY }} - run: npm test + env: + # Required to allow Datadog to trace Vitest tests + NODE_OPTIONS: -r ${{ env.DD_TRACE_PACKAGE }} --import ${{ env.DD_TRACE_ESM_IMPORT }} gatekeep: name: Determine if Build & Deploy is needed outputs: