Skip to content

Commit

Permalink
chore: add node:16 to the test matrix (open-telemetry#510)
Browse files Browse the repository at this point in the history
Co-authored-by: Valentin Marchaud <[email protected]>
  • Loading branch information
rauno56 and vmarchaud authored Jun 12, 2021
1 parent 93753ec commit 3e519d9
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches: [main]
types: [closed]

jobs:
publish_to_npm:
name: Publish to NPM and GitHub
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
create_release_pr:
name: Create Release PR and Draft Release
runs-on: ubuntu-latest
steps:
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -56,8 +56,8 @@ jobs:
branch: release/${{ github.event.inputs.version }}
commit-message: 'chore: ${{ github.event.inputs.version }} release proposal'
title: 'chore: ${{ github.event.inputs.version }} release proposal'
body: |
body: |
This is an auto-generated release PR. If additional changes need to be incorporated before the release, the CHANGELOG must be updated manually.
Merging this PR will automatically release all packages to NPM.
delete-branch: true
8 changes: 5 additions & 3 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
container: ["node:8", "node:10", "node:12", "node:14"]
container: ["node:8", "node:10", "node:12", "node:14", "node:16"]
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
Expand Down Expand Up @@ -91,7 +91,9 @@ jobs:
key: ${{ runner.os }}-${{ matrix.container }}-${{ hashFiles('**/package.json') }}
- name: Install Root Dependencies
run: npm install --ignore-scripts
- name: Boostrap Dependencies
- name: Fix npm cache permissions
run: chown -R 1001:121 "/github/home/.npm"
- name: Bootstrap Dependencies
run: npx lerna bootstrap --no-ci
- name: Unit tests
run: npm run test
Expand Down Expand Up @@ -124,7 +126,7 @@ jobs:
key: ${{ runner.os }}-node:12-${{ hashFiles('**/package.json') }}
- name: Install Root Dependencies
run: npm install --ignore-scripts
- name: Boostrap Dependencies
- name: Bootstrap Dependencies
run: npx lerna bootstrap --no-ci
- name: Unit tests
run: npm run test:browser
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-id-generator-aws-xray/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-mocha": "2.0.1",
"karma-spec-reporter": "0.0.32",
"karma-webpack": "5.0.0",
"karma-webpack": "^4.0.2",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,32 @@ describe('NetInstrumentation', () => {
});

it('should produce a generic span in case transport type can not be determined', done => {
socket.once(SocketEvent.CLOSE, () => {
const span = getSpan();
const assertSpan = () => {
try {
const span = getSpan();
assert.strictEqual(
span.attributes[SemanticAttributes.NET_TRANSPORT],
undefined
);
assert.strictEqual(span.status.code, SpanStatusCode.ERROR);
done();
} catch (e) {
done(e);
}
};
try {
// socket.connect() will not throw before node@16 only closes
socket.once(SocketEvent.CLOSE, assertSpan);
socket.connect(undefined as unknown as string);
} catch (e) {
// socket.connect() will throw in node@16
socket.removeListener(SocketEvent.CLOSE, assertSpan);
assert.strictEqual(
span.attributes[SemanticAttributes.NET_TRANSPORT],
undefined
e.message,
'The "options" or "port" or "path" argument must be specified'
);
assert.strictEqual(span.status.code, SpanStatusCode.ERROR);
done();
});
socket.connect(undefined as unknown as string);
assertSpan();
}
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@
"rimraf": "3.0.2",
"router": "1.3.5",
"ts-mocha": "8.0.0",
"tslint-consistent-codestyle": "1.16.0",
"tslint-microsoft-contrib": "6.2.0",
"typescript": "4.3.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion propagators/opentelemetry-propagator-aws-xray/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-mocha": "2.0.1",
"karma-spec-reporter": "0.0.32",
"karma-webpack": "5.0.0",
"karma-webpack": "^4.0.2",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
Expand Down

0 comments on commit 3e519d9

Please sign in to comment.