Skip to content

Commit

Permalink
perf: first lumigo opentelemetry-js-distro release
Browse files Browse the repository at this point in the history
  • Loading branch information
CircleCI committed Jul 3, 2022
1 parent c684725 commit d210e1a
Show file tree
Hide file tree
Showing 60 changed files with 18,249 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "12"
}
}
],
["@babel/preset-typescript"]
]
}
135 changes: 135 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
version: 2.1
defaults: &defaults
working_directory: ~/opentelemetry-js-distro
docker:
- image: lumigo/ci:latest
auth:
username: lumigo
password: $DOCKERHUB_PASSWORD

orbs:
lumigo-orb: lumigo/lumigo-orb@volatile

workflows:
test-deploy:
jobs:
- test-component-js:
matrix:
parameters:
node_cimg_tag: [ "12.13", "14.19", "16.15" ]
test_category: [ "express" ]
filters:
branches:
ignore: main
- test:
filters:
branches:
ignore: main
- lumigo-orb/be-deploy:
filters:
branches:
ignore: main
requires:
- test
- lumigo-orb/integration-test:
deploy_spec: default
tests_spec: testNormal
filters:
branches:
ignore: main
requires:
- lumigo-orb/be-deploy
- deploy:
filters:
branches:
only: main
version: 2


jobs:
test:
working_directory: ~/opentelemetry-js-distro
docker:
- image: lumigo/ci:latest
auth:
username: lumigo
password: $DOCKERHUB_PASSWORD
environment:
- TZ: Asia/Jerusalem
- NODE_OPTIONS: --max_old_space_size=1500
resource_class: medium+
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: install-npm-wee
command: npm install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules
- run:
name: prettier
command: npm run prettier:ci
- run:
name: test
command: npm run test:unit
- run:
name: eslint
command: npm run lint
- run:
name: code-coverage
command: npm test --coverage && codecov
- store_artifacts:
path: coverage
prefix: coverage
test-component-js:
working_directory: ~/opentelemetry-js-distro
parameters:
node_cimg_tag:
type: string
test_category:
type: string
docker:
- image: cimg/node:<< parameters.node_cimg_tag >>
steps:
- checkout
- run: npm ci
- run: npm run build
- run: npm run install-component
- run: npm run test:component:<< parameters.test_category>>
deploy:
working_directory: ~/opentelemetry-js-distro
docker:
- image: lumigo/ci:latest
auth:
username: lumigo
password: $DOCKERHUB_PASSWORD
environment:
- TZ: Asia/Jerusalem
resource_class: medium+
steps:
- run:
command: |
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
cd ..
git clone git@github.com:lumigo-io/common-resources.git
- run:
command: |
cd ..
git clone git@github.com:lumigo-io/utils.git
- checkout
- run:
name: Check if tagged
command: |
tags=$(git tag -l --points-at HEAD)
echo "Tags $tags"
if [[ ! -z "$tags" ]]
then
echo "A tagged commit, skip..."
circleci step halt
fi
- run:
name: deploy to npm
command: ./scripts/bd_to_prod.sh
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/*.js
**/*.test.*s
src/**/jsonSortify.ts
src/**/xmlToJson.ts
src/**/logsInstrumentation.ts
45 changes: 45 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// eslint-disable-next-line @typescript-eslint/ban-types
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'prefer-const': [
'error',
{
destructuring: 'any',
ignoreReadBeforeAssign: false,
},
],
'@typescript-eslint/ban-types': [
'error',
{
types: {
String: false,
Boolean: false,
Number: false,
Symbol: false,
'{}': false,
Object: false,
object: false,
Function: false,
},
extendDefaults: true,
},
],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-console': 'off',
'ban-types': 'off',
'no-case-declarations': 'off',
},
};
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@lumigo-io/angels
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: doriaviram

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See an error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Runtime details**
- runtime version (node8, 10x, 12)..

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: doriaviram

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
34 changes: 34 additions & 0 deletions .github/pull_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!-- If this pull requests solves an issue, as an example, use `Closes #31`. #31 stands for the issue number -->

## Fixes Issue

<!-- Remove this section if not applicable -->

<!-- Example: Closes #31 -->

## Changes proposed

<!-- Here comes all the changes proposed through this PR -->

<!-- Check all the boxes which are applicable to check the box correct follow the following conventions -->
<!--
[x] - Correct
[X] - Correct
-->

## Check List (Check all the boxes which are applicable) <!-- Follow the above conventions to check the box -->

- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] All new and existing tests passed.
- [ ] This PR does not contain plagiarized content.
- [ ] The title of my pull request is a short description of the requested changes.

## Screenshots

<!-- Add all the screenshots which support your changes -->

## Note to reviewers

<!-- Add a note to reviewers if applicable -->
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pids
*.pid
*.seed
*.pid.lock

.idea
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

Expand Down Expand Up @@ -102,3 +102,6 @@ dist

# TernJS port file
.tern-port

test/component/node/package-lock.json
test/component/node/spans-test*.json
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*
!dist/**/**.js
!dist/**/**.js.map
!dist/**/**.ts
!dist/**/**.d.ts
!package.json
!README.md
!LICENSE
15 changes: 15 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"printWidth": 100,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"useTabs": false,
"parser": "babel",
"overrides": [
{
"files": "*.json",
"options": { "parser": "json", "printWidth": 200 }
}
]
}
Loading

0 comments on commit d210e1a

Please sign in to comment.