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: