-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unit test for npm otel package and relative CI
- Loading branch information
1 parent
0dcabd5
commit e461eda
Showing
5 changed files
with
6,252 additions
and
2,623 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: CI for otel Package | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'packages/javascript/otel/**' | ||
|
||
jobs: | ||
build-and-test: | ||
name: Build and Test otel Package | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: packages/javascript/otel | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
cache: 'npm' | ||
cache-dependency-path: packages/javascript/otel/package-lock.json | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run Lint | ||
run: npm run lint | ||
|
||
- name: Build the package | ||
run: npm run build | ||
|
||
- name: Run Tests | ||
env: | ||
INFRASTACK_TAGS: '[{"key": "env", "value": "test"}]' | ||
run: npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
globals: { | ||
'ts-jest': { | ||
tsconfig: 'tsconfig.json', | ||
}, | ||
}, | ||
modulePathIgnorePatterns: ['dist'], | ||
}; |
Oops, something went wrong.