Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
9cf880a
chore: add new PR workflow
david-luna May 29, 2025
58702ed
chore: test ci:changed scripts
david-luna May 29, 2025
5b4e1b4
chore: upload test artifacts
david-luna May 29, 2025
294b6e4
chore: add logs in coverage step
david-luna May 29, 2025
780ffcd
chore: add job dependency
david-luna May 29, 2025
de2e6ef
chore: fix dependencies in jobs
david-luna May 29, 2025
ad59caf
chore: add missing steps to coverage job
david-luna May 29, 2025
c019193
chore: remove other PR workflows
david-luna May 30, 2025
4d13f2e
chore: add some logs in pr workflow
david-luna Jun 2, 2025
5d79d66
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Jun 2, 2025
f57c5c5
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Jun 2, 2025
368d918
chore: rename scripts
david-luna Jun 2, 2025
85013e8
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Jun 10, 2025
1211d78
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Jun 12, 2025
90262a6
Merge branch 'dluna-ci-pr-speed-and-coverage' of github.com:david-lun…
david-luna Jun 12, 2025
652af62
chore: add coverage merge script
david-luna Jun 12, 2025
17ea030
fix: use the new affected scripts
david-luna Jun 12, 2025
03e8c67
chore: update amqplib test script
david-luna Jun 12, 2025
0254c12
chore: update scripts
david-luna Jun 12, 2025
2479414
chore: revert cucumber instr changes
david-luna Jun 12, 2025
cbedab6
chore: add more plugins to coverage
david-luna Jun 12, 2025
22b32f2
chore: add another batch of instrumentations
david-luna Jun 12, 2025
a75ac50
chore: add another round of instrumentations
david-luna Jun 12, 2025
48612c0
chore: add another chunk of instrumentations
david-luna Jun 12, 2025
939bec9
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Jun 12, 2025
ddca5a1
chore: add codecov action with dry_run
david-luna Jun 12, 2025
855e679
chore: add flags script
david-luna Jun 13, 2025
ad14f95
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Jul 8, 2025
d8068be
chore: update codecov.yml
david-luna Jul 8, 2025
444bee8
chore: rename job to match PR checks
david-luna Jul 8, 2025
e9e1648
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Jul 10, 2025
6f2b9a7
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Aug 1, 2025
7254591
Merge branch 'dluna-ci-pr-speed-and-coverage' of github.com:david-lun…
david-luna Aug 1, 2025
3257370
chore: rename coverage script
david-luna Aug 1, 2025
51afb3e
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Aug 1, 2025
1ed7097
chore: add missign peer dependenciy for tav tests in pino
david-luna Aug 1, 2025
0896c53
chore: add tav command to debug
david-luna Aug 1, 2025
9c93606
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Aug 18, 2025
96e0b65
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Aug 20, 2025
996e92c
chore: reduce the noise on debug command
david-luna Aug 21, 2025
2694774
chore: run TAV sequentially to check pino issue
david-luna Aug 21, 2025
bb9f9e6
chore: tweak num of precesses running tests
david-luna Aug 21, 2025
4ec6c5e
chore: disable parallelization in TAV
david-luna Aug 21, 2025
de04732
chore: restore tav.yml for pino
david-luna Aug 21, 2025
c3b7bf6
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Aug 21, 2025
7d740b1
fix: fx coverage merge script
david-luna Aug 21, 2025
e3fe9b2
Merge branch 'dluna-ci-pr-speed-and-coverage' of github.com:david-lun…
david-luna Aug 21, 2025
c261518
chore: add openai instrumentation to codecov
david-luna Aug 22, 2025
c2a3421
chore: made test workflow for PRs and push
david-luna Aug 28, 2025
c1d3a97
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Aug 28, 2025
8d746cc
chore: add --no-clean flag for openai tests
david-luna Aug 28, 2025
70ecb44
chore: fix commit selection in workflow
david-luna Aug 28, 2025
e71e729
chore: remove condition in workflow setps
david-luna Aug 28, 2025
bf990f1
fix: fix syntax
david-luna Aug 28, 2025
024089f
chore: fix set of env vars for workflow
david-luna Aug 28, 2025
99ccc05
chore: update cassandra image
david-luna Aug 28, 2025
a74c357
chore: update comments
david-luna Aug 28, 2025
390c48e
chore: integrated browser tests in unit test jobs
david-luna Aug 28, 2025
d296e96
chore: test affected on a browser instrumentation
david-luna Aug 28, 2025
821c403
chore: remove obsolete workflow
david-luna Aug 28, 2025
e88a361
chore: alig cassandra image to docker compose file
david-luna Aug 28, 2025
f937794
chore: revert memcached version change
david-luna Aug 28, 2025
da4b962
chore: put corre t version of download-artifact action
david-luna Aug 28, 2025
92ee908
chore: set proper commits in coverage job
david-luna Aug 28, 2025
6f63e31
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Aug 28, 2025
a4987d4
chore: update codecov comment layout and set back coverage tresholds
david-luna Aug 28, 2025
112b684
chore: update flag upload script
david-luna Aug 28, 2025
eb5f75b
chore: update upload flags script
david-luna Aug 28, 2025
b069a16
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Aug 29, 2025
f08e6cc
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Aug 29, 2025
3ea2b4a
chore: switch codecov action to upload script
david-luna Aug 29, 2025
6971ea3
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Aug 29, 2025
2598ed9
chore: pass sha and branch as parameters
david-luna Aug 29, 2025
b51a54a
chore: update ref name in upload reports
david-luna Aug 29, 2025
7455a31
chore: add debug logs in workflow
david-luna Sep 1, 2025
ea1d6a8
chore: enable codecov execution
david-luna Sep 1, 2025
4e02001
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Sep 1, 2025
c39e7bc
chore: use atuomatic flag management
david-luna Sep 1, 2025
a9e7074
chore: add report and flag to codecov command
david-luna Sep 1, 2025
a29b19b
chore: add dir to codecov command
david-luna Sep 1, 2025
957a5c9
chore: update path for network file search
david-luna Sep 1, 2025
adf3f00
chore: add formatting
david-luna Sep 1, 2025
89458a6
chore: add codecov token into script
david-luna Sep 2, 2025
6b31429
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Sep 2, 2025
28d0b4e
chore: codecov token is empty
david-luna Sep 2, 2025
1fd29b8
chore: fix CodeQL issue
david-luna Sep 2, 2025
2511656
chore: fix CodeQL issue
david-luna Sep 2, 2025
fff0f8c
chore: remove any path resolution from inputs
david-luna Sep 2, 2025
8fe9569
chore: fix arguments in script
david-luna Sep 2, 2025
78575e0
chore: fix error in script
david-luna Sep 2, 2025
b49e3bf
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Sep 2, 2025
3a61348
chore: drop dry-run option to actually upload coverage files
david-luna Sep 3, 2025
a559b20
Merge branch 'dluna-ci-pr-speed-and-coverage' of github.com:david-lun…
david-luna Sep 3, 2025
37ce8fa
chore: add path fixing
david-luna Sep 3, 2025
74c71e2
chore: another attempt to fix paths
david-luna Sep 3, 2025
06a066b
chore: remove network folder option
david-luna Sep 3, 2025
af1f799
chore: change param order to support push event
david-luna Sep 3, 2025
faffb4e
chore: sha and branch are null in push event
david-luna Sep 3, 2025
bcc710a
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna Sep 4, 2025
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
37 changes: 0 additions & 37 deletions .github/workflows/test-all-versions.pr.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/test-all-versions.push.yml

This file was deleted.

136 changes: 93 additions & 43 deletions .github/workflows/unit-test.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: Unit Tests
name: Test Packages
on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
build-and-cache:
compile:
strategy:
fail-fast: false
runs-on: ubuntu-latest
Expand All @@ -26,19 +27,33 @@ jobs:
node-version: 18
- name: Install
run: npm ci
- name: Build
run: npm run compile
# Note: when pushing to main we want to test only what changed in
# last commit. Otherwise we want to test all changes from origin/main.
# So we set the right values for base and head commits depending
# on the type of event (PR or push)
# ref: https://nx.dev/ci/features/affected#configure-affected-on-ci
- name: Set base and head commits
run: |
if [ "${{github.event_name}}" == "push" ]; then
echo "NX_BASE=origin/main~1" >> "$GITHUB_ENV"
echo "NX_HEAD=origin/main" >> "$GITHUB_ENV"
else
echo "NX_BASE=origin/main" >> "$GITHUB_ENV"
echo "NX_HEAD=HEAD" >> "$GITHUB_ENV"
fi
- name: Compile (Delta)
run: npm run compile:ci:affected
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: tests-build-cache-${{ github.run_number }}
name: compile-cache-${{ github.run_number }}
path: .nx
include-hidden-files: true
if-no-files-found: error
retention-days: 1

unit-test:
needs: build-and-cache
needs: compile
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -172,6 +187,7 @@ jobs:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
NPM_CONFIG_UNSAFE_PERM: true
NODE_OPTIONS: --max-old-space-size=4096
steps:
- name: Checkout
uses: actions/checkout@v5
Expand All @@ -185,56 +201,90 @@ jobs:
- name: Download Build Artifacts
uses: actions/download-artifact@v5
with:
name: tests-build-cache-${{ github.run_number }}
name: compile-cache-${{ github.run_number }}
path: .nx
- name: Build
run: npm run compile
- name: Unit tests (Full)
if: matrix.code-coverage
run: npm run test
- name: Unit tests (Delta)
if: ${{ !matrix.code-coverage }}
run: npm run test:ci:changed
- name: Report Coverage
if: ${{ matrix.code-coverage && !cancelled()}}
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# Note: see comment in the compile job
- name: Set base and head commits
run: |
if [ "${{github.event_name}}" == "push" ]; then
echo "NX_BASE=origin/main~1" >> "$GITHUB_ENV"
echo "NX_HEAD=origin/main" >> "$GITHUB_ENV"
else
echo "NX_BASE=origin/main" >> "$GITHUB_ENV"
echo "NX_HEAD=HEAD" >> "$GITHUB_ENV"
fi
- name: Compile (Delta)
run: npm run compile:ci:affected
- name: Unit tests (Browser - Delta)
if: ${{ matrix.node == '22' }}
run: npm run test:browser:ci:affected
- name: Unit tests (Nodejs - Delta)
run: npm run test:ci:affected
- name: Test All Versions (Delta)
run: npm run test-all-versions:ci:affected
- name: Upload Test Artifacts
uses: actions/upload-artifact@v4
with:
verbose: true
name: tests-coverage-cache-${{ github.run_number }}-${{ matrix.node }}
include-hidden-files: true
if-no-files-found: error
retention-days: 1
path: |
!node_modules
packages/*/.nyc_output/**
LICENSE

browser-test:
needs: build-and-cache
strategy:
fail-fast: false
matrix:
node: ["22"]
test-coverage-report:
runs-on: ubuntu-latest
env:
NPM_CONFIG_UNSAFE_PERM: true
NODE_OPTIONS: --max-old-space-size=4096
needs: unit-test
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
node-version: 18
- name: Install
run: npm ci
- name: Download Build Artifacts
# NOTE: keep this in sync with the node versions from `unit-test` job
- name: Download Test Artifacts (18)
uses: actions/download-artifact@v5
with:
name: tests-build-cache-${{ github.run_number }}
path: .nx
- name: Build
run: npm run compile
- name: Unit tests
run: npm run test:browser
- name: Report Coverage
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
name: tests-coverage-cache-${{ github.run_number }}-18
path: .
- name: Download Test Artifacts (18.19.0)
uses: actions/download-artifact@v5
with:
verbose: true
name: tests-coverage-cache-${{ github.run_number }}-18.19.0
path: .
- name: Download Test Artifacts (20)
uses: actions/download-artifact@v5
with:
name: tests-coverage-cache-${{ github.run_number }}-20
path: .
- name: Download Test Artifacts (20.6.0)
uses: actions/download-artifact@v5
with:
name: tests-coverage-cache-${{ github.run_number }}-20.6.0
path: .
- name: Download Test Artifacts (22)
uses: actions/download-artifact@v5
with:
name: tests-coverage-cache-${{ github.run_number }}-22
path: .
# Note: see comment in the compile job
- name: Set base and head commits
run: |
if [ "${{github.event_name}}" == "push" ]; then
echo "NX_BASE=origin/main~1" >> "$GITHUB_ENV"
echo "NX_HEAD=origin/main" >> "$GITHUB_ENV"
else
echo "NX_BASE=origin/main" >> "$GITHUB_ENV"
echo "NX_HEAD=HEAD" >> "$GITHUB_ENV"
fi
- name: Merge coverage (Delta)
run: npm run test-merge-coverage:ci:affected
- name: Report Coverage with Flags
run: node ./scripts/codecov-upload-flags.mjs ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.head.label }}

13 changes: 11 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
codecov:
notify:
require_ci_to_pass: no
after_n_builds: 1
require_ci_to_pass: no
comment:
layout: "header, changes, diff, files"
layout: "header, changes, diff, flags, files"
behavior: default
coverage:
status:
Expand All @@ -13,3 +14,11 @@ coverage:
default:
target: auto
threshold: 1%
# Codecov action does not read this file to do the split of coverage
# by flag. So there is no reason to have explicit flag definition.
# We use automatinc flag management.
# ref: https://about.codecov.io/blog/introducing-improved-flag-management-with-automatic-flags/
# note: Uploads are made per package(flag) in ./scripts/codecov-upload-flags.mjs
flag_management:
default_rules:
carryforward: true
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@
"clean": "nx run-many -t clean",
"version:update": "nx run-many -t version:update",
"compile": "nx run-many -t compile",
"compile:ci:affected": "nx affected -t compile",
"test": "nx run-many -t test",
"test:ci:affected": "nx affected -t test",
"test:browser": "nx run-many -t test:browser",
"test:ci:changed": "nx affected -t test --base=origin/main --head=HEAD",
"test-all-versions": "nx run-many -t test-all-versions",
"test:browser:ci:affected": "nx affected -t test:browser",
"test-all-versions": "nx run-many --parallel=false -t test-all-versions",
"test-all-versions:ci:affected": "nx affected --parallel=false -t test-all-versions",
"test-merge-coverage:ci:affected": "nx affected -t test-merge-coverage",
"test-services:start": "docker compose -f ./test/docker-compose.yaml up -d --wait",
"test-services:stop": "docker compose -f ./test/docker-compose.yaml down",
"test:with-services-env": "cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=./test/test-services.env npm test",
"test-all-versions:with-services-env": "cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=./test/test-services.env npm run test-all-versions",
"changelog": "lerna-changelog",
"lint": "nx run-many -t lint && npm run lint:deps && npm run lint:readme && npm run lint:markdown && npm run lint:semconv-deps && npm run lint:examples",
"lint:fix": "nx run-many -t lint:fix && npm run lint:markdown:fix",
Expand Down
3 changes: 2 additions & 1 deletion packages/instrumentation-amqplib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@
"lint:readme": "node ../../scripts/lint-readme.js",
"prepublishOnly": "npm run compile",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc mocha --require '@opentelemetry/contrib-test-utils' 'test/**/*.test.ts'",
"test": "nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' 'test/**/*.test.ts'",
"test:with-services-env": "cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm test",
"test-all-versions": "tav",
"test-all-versions:with-services-env": "cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm run test-all-versions",
"test-merge-coverage": "nyc merge .nyc_output coverage/coverage-final.json",
"test-services:start": "cd ../.. && npm run test-services:start rabbitmq",
"test-services:stop": "cd ../.. && npm run test-services:stop rabbitmq",
"version:update": "node ../../scripts/version-update.js",
Expand Down
11 changes: 6 additions & 5 deletions packages/instrumentation-aws-lambda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
"directory": "packages/instrumentation-aws-lambda"
},
"scripts": {
"test": "nyc mocha 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"clean": "rimraf build/*",
"compile": "tsc -p .",
"compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-aws-lambda",
"lint": "eslint . --ext=ts,js,mjs",
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
"lint:readme": "node ../../scripts/lint-readme.js",
"prepublishOnly": "npm run compile",
"version:update": "node ../../scripts/version-update.js",
"compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-aws-lambda",
"compile": "tsc -p ."
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc --no-clean mocha 'test/**/*.test.ts'",
"test-merge-coverage": "nyc merge .nyc_output coverage/coverage-final.json",
"version:update": "node ../../scripts/version-update.js"
},
"keywords": [
"aws-lambda",
Expand Down
5 changes: 3 additions & 2 deletions packages/instrumentation-bunyan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
},
"scripts": {
"clean": "rimraf build/*",
"compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-bunyan",
"compile": "tsc -p .",
"compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-bunyan",
"lint": "eslint . --ext=ts,js,mjs",
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
"prepublishOnly": "npm run compile",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc mocha 'test/**/*.test.ts'",
"test": "nyc --no-clean mocha 'test/**/*.test.ts'",
"test-all-versions": "tav",
"test-merge-coverage": "nyc merge .nyc_output coverage/coverage-final.json",
"version:update": "node ../../scripts/version-update.js"
},
"keywords": [
Expand Down
4 changes: 3 additions & 1 deletion packages/instrumentation-cassandra-driver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
"lint:readme": "node ../../scripts/lint-readme.js",
"prepublishOnly": "npm run compile",
"setup:dev": "nx run-many -t compile -p @opentelemetry/instrumentation-cassandra-driver",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc mocha 'test/**/*.test.ts'",
"test": "nyc --no-clean mocha 'test/**/*.test.ts'",
"test:with-services-env": "cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm test",
"//todo": "echo \"add test-all-versions\"",
"test-merge-coverage": "nyc merge .nyc_output coverage/coverage-final.json",
"test-services:start": "cd ../.. && npm run test-services:start cassandra",
"test-services:stop": "cd ../.. && npm run test-services:stop cassandra",
"version:update": "node ../../scripts/version-update.js"
Expand Down
3 changes: 2 additions & 1 deletion packages/instrumentation-connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
"lint:readme": "node ../../scripts/lint-readme.js",
"prepublishOnly": "npm run compile",
"test": "nyc mocha 'test/**/*.test.ts'",
"test": "nyc --no-clean mocha 'test/**/*.test.ts'",
"test-merge-coverage": "nyc merge .nyc_output coverage/coverage-final.json",
"version:update": "node ../../scripts/version-update.js",
"watch": "tsc -w"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/instrumentation-dataloader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
"prepublishOnly": "npm run compile",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc mocha 'test/**/*.test.ts'",
"test": "nyc --no-clean mocha 'test/**/*.test.ts'",
"test-all-versions": "tav",
"test-merge-coverage": "nyc merge .nyc_output coverage/coverage-final.json",
"version:update": "node ../../scripts/version-update.js"
},
"keywords": [
Expand Down
Loading
Loading