Skip to content
Closed
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
16 changes: 10 additions & 6 deletions .github/workflows/aiguard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ env:
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}

jobs:

macos:
runs-on: macos-latest
steps:
Expand All @@ -26,7 +25,7 @@ jobs:
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
flags: aiguard-macos
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
if: always() && github.actor != 'dependabot[bot]'
with:
api_key: ${{ secrets.DD_API_KEY }}
Expand Down Expand Up @@ -56,12 +55,12 @@ jobs:
- uses: ./.github/actions/node/latest
- uses: ./.github/actions/install
with:
cache: 'true'
cache: "true"
- run: yarn test:aiguard:ci
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
flags: aiguard-windows
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
if: always() && github.actor != 'dependabot[bot]'
with:
api_key: ${{ secrets.DD_API_KEY }}
Expand All @@ -78,8 +77,13 @@ jobs:
with:
version: ${{ matrix.version }}
- uses: ./.github/actions/install
- run: yarn test:integration:aiguard
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
- run: yarn test:integration:aiguard:ci
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-aiguard/lcov.info
flags: integration-aiguard
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
if: always() && github.actor != 'dependabot[bot]'
with:
api_key: ${{ secrets.DD_API_KEY }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/appsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,12 @@ jobs:
with:
version: ${{ matrix.version }}
- uses: ./.github/actions/install
- run: yarn test:integration:appsec
- run: yarn test:integration:appsec:ci
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-appsec/lcov.info
flags: integration-appsec
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
if: always() && github.actor != 'dependabot[bot]'
with:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/debugger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ jobs:
version: ${{ matrix.version }}
- uses: ./.github/actions/install
- run: yarn test:debugger:ci
- run: yarn test:integration:debugger
- run: yarn test:integration:debugger:ci
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-debugger/lcov.info
flags: integration-debugger
- if: always()
uses: ./.github/actions/testagent/logs
with:
Expand Down
27 changes: 21 additions & 6 deletions .github/workflows/openfeature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ jobs:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/node/latest
- uses: ./.github/actions/install
- run: yarn test:integration:openfeature
- run: yarn test:integration:openfeature:ci
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-openfeature/lcov.info
flags: integration-openfeature
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
if: always() && github.actor != 'dependabot[bot]'
with:
Expand All @@ -60,13 +65,18 @@ jobs:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/node/oldest-maintenance-lts
- uses: ./.github/actions/install
- run: yarn test:integration:openfeature
- run: yarn test:integration:openfeature:ci
- uses: ./.github/actions/node/newest-maintenance-lts
- run: yarn test:integration:openfeature
- run: yarn test:integration:openfeature:ci
- uses: ./.github/actions/node/active-lts
- run: yarn test:integration:openfeature
- run: yarn test:integration:openfeature:ci
- uses: ./.github/actions/node/latest
- run: yarn test:integration:openfeature
- run: yarn test:integration:openfeature:ci
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-openfeature/lcov.info
flags: integration-openfeature
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
if: always() && github.actor != 'dependabot[bot]'
with:
Expand All @@ -81,7 +91,12 @@ jobs:
- uses: ./.github/actions/install
with:
cache: 'true'
- run: yarn test:integration:openfeature
- run: yarn test:integration:openfeature:ci
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-openfeature/lcov.info
flags: integration-openfeature
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
if: always() && github.actor != 'dependabot[bot]'
with:
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,18 @@ jobs:
# Disable core dumps since some integration tests intentionally abort and core dump generation takes around 5-10s
- uses: ./.github/actions/install
- run: sudo sysctl -w kernel.core_pattern='|/bin/false'
- run: yarn test:integration
- run: yarn test:integration:esbuild
- run: yarn test:integration:ci
- run: yarn test:integration:esbuild:ci
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-integration/lcov.info
flags: integration
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-esbuild/lcov.info
flags: integration-esbuild
- uses: DataDog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a # v2.0.0
if: always() && github.actor != 'dependabot[bot]'
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/profiling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: ./.github/actions/node/latest
- uses: ./.github/actions/install
- run: yarn test:profiler:ci
- run: yarn test:integration:profiler
- run: yarn test:integration:profiler:ci
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
flags: profiling-macos
Expand All @@ -46,16 +46,16 @@ jobs:
- uses: ./.github/actions/node/oldest-maintenance-lts
- uses: ./.github/actions/install
- run: yarn test:profiler:ci
- run: yarn test:integration:profiler
- run: yarn test:integration:profiler:ci
- uses: ./.github/actions/node/newest-maintenance-lts
- run: yarn test:profiler:ci
- run: yarn test:integration:profiler
- run: yarn test:integration:profiler:ci
- uses: ./.github/actions/node/active-lts
- run: yarn test:profiler:ci
- run: yarn test:integration:profiler
- run: yarn test:integration:profiler:ci
- uses: ./.github/actions/node/latest
- run: yarn test:profiler:ci
- run: yarn test:integration:profiler
- run: yarn test:integration:profiler:ci
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
flags: profiling-ubuntu
Expand All @@ -74,7 +74,7 @@ jobs:
with:
cache: 'true'
- run: yarn test:profiler:ci
- run: yarn test:integration:profiler
- run: yarn test:integration:profiler:ci
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
flags: profiling-windows
Expand Down
67 changes: 51 additions & 16 deletions .github/workflows/test-optimization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
with:
path: ~/.cache/ms-playwright
key: playwright-browsers-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
- run: yarn test:integration:testopt
- run: yarn test:integration:testopt:ci

integration-playwright:
strategy:
Expand Down Expand Up @@ -100,9 +100,14 @@ jobs:
with:
path: /github/home/.cache/ms-playwright
key: playwright-browsers-oldest-dd${{ steps.dd-version.outputs.major }}
- run: yarn test:integration:playwright
- run: yarn test:integration:playwright:ci
env:
NODE_OPTIONS: '-r ./ci/init'
NODE_OPTIONS: "-r ./ci/init"
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-playwright/lcov.info
flags: integration-playwright

integration-mocha:
strategy:
Expand All @@ -120,10 +125,15 @@ jobs:
with:
version: ${{ matrix.version }}
- uses: ./.github/actions/install
- run: yarn test:integration:mocha
- run: yarn test:integration:mocha:ci
env:
NODE_OPTIONS: '-r ./ci/init'
NODE_OPTIONS: "-r ./ci/init"
MOCHA_VERSION: ${{ matrix.mocha-version }}
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-mocha/lcov.info
flags: integration-mocha

integration-jest:
strategy:
Expand All @@ -141,10 +151,15 @@ jobs:
with:
version: ${{ matrix.version }}
- uses: ./.github/actions/install
- run: yarn test:integration:jest
- run: yarn test:integration:jest:ci
env:
NODE_OPTIONS: '-r ./ci/init'
NODE_OPTIONS: "-r ./ci/init"
JEST_VERSION: ${{ matrix.jest-version }}
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-jest/lcov.info
flags: integration-jest

integration-cucumber:
strategy:
Expand All @@ -162,10 +177,15 @@ jobs:
with:
version: ${{ matrix.version }}
- uses: ./.github/actions/install
- run: yarn test:integration:cucumber
- run: yarn test:integration:cucumber:ci
env:
NODE_OPTIONS: '-r ./ci/init'
NODE_OPTIONS: "-r ./ci/init"
CUCUMBER_VERSION: ${{ matrix.cucumber-version }}
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-cucumber/lcov.info
flags: integration-cucumber

integration-selenium:
strategy:
Expand Down Expand Up @@ -200,9 +220,14 @@ jobs:
sudo mv chromedriver-linux64/chromedriver /usr/bin/chromedriver
sudo chmod +x /usr/bin/chromedriver
- uses: ./.github/actions/install
- run: yarn test:integration:selenium
- run: yarn test:integration:selenium:ci
env:
NODE_OPTIONS: '-r ./ci/init'
NODE_OPTIONS: "-r ./ci/init"
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-selenium/lcov.info
flags: integration-selenium

integration-cypress:
strategy:
Expand All @@ -213,7 +238,7 @@ jobs:
# 14.5.4 is the latest version that supports Node 18
# The logic to decide whether the tests run lives in integration-tests/cypress/cypress.spec.js
cypress-version: [6.7.0, 10.2.0, 14.5.4, latest]
module-type: ['commonJS', 'esm']
module-type: ["commonJS", "esm"]
runs-on: ubuntu-latest
env:
DD_SERVICE: dd-trace-js-integration-tests
Expand All @@ -234,12 +259,17 @@ jobs:
path: ~/.cache/Cypress
key: cypress-binary-${{ matrix.cypress-version }}
- run: yarn config set ignore-engines true
- run: yarn test:integration:cypress --ignore-engines
- run: yarn test:integration:cypress:ci --ignore-engines
env:
CYPRESS_VERSION: ${{ matrix.cypress-version }}
NODE_OPTIONS: '-r ./ci/init'
NODE_OPTIONS: "-r ./ci/init"
CYPRESS_MODULE_TYPE: ${{ matrix.module-type }}
OPTIONS_OVERRIDE: 1
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-cypress/lcov.info
flags: integration-cypress

integration-vitest:
runs-on: ubuntu-latest
Expand All @@ -257,6 +287,11 @@ jobs:
with:
version: ${{ matrix.version }}
- uses: ./.github/actions/install
- run: yarn test:integration:vitest
- run: yarn test:integration:vitest:ci
env:
NODE_OPTIONS: '-r ./ci/init'
NODE_OPTIONS: "-r ./ci/init"
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
disable_search: true
files: coverage/integration-vitest/lcov.info
flags: integration-vitest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pids
lib-cov

# Coverage directory used by tools like istanbul
.coverage
coverage

# nyc test coverage
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,11 @@ If running locally without an internet connection,
it's possible to use the environment variable `OFFLINE=true` to make `yarn` use the `--prefer-offline` flag,
which will use the local yarn cache instead of fetching packages from npm.

To collect coverage from integration tests,
use the `test:integration*:ci` scripts.
These enable V8 coverage for the app-under-test and then run `scripts/integration-coverage-report.js` using the dedicated config in `integration-tests/nyc-integration.config.js`.
Reports are written to `coverage/integration-<suite>` with raw output in `.nyc_output/integration-<suite>`.

### Adding a Plugin Test to CI

The plugin tests run on pull requests in Github Actions. Each plugin test suite has its own Github job, so adding a new suite to CI
Expand Down
Loading
Loading