Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: speed up builds #1748

Merged
merged 6 commits into from
Dec 18, 2020
Merged
Show file tree
Hide file tree
Changes from 3 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
36 changes: 0 additions & 36 deletions .github/workflows/backcompat.yml

This file was deleted.

11 changes: 7 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v2

- name: Install and Build 🔧
run: |
- name: Install Dependencies
npm install --ignore-scripts
npx lerna bootstrap --scope @opentelemetry/api --include-filtered-dependencies
npm run docs
npx lerna bootstrap --no-ci --scope @opentelemetry/api --include-dependencies

- name: Build 🔧
run: |
npx lerna run compile --scope @opentelemetry/api
npx lerna run docs

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,15 @@ jobs:
npm run lint
npm run lint:examples

- name: Install and Build API Dependencies
run: npx lerna bootstrap --no-ci --scope @opentelemetry/api --include-filtered-dependencies
- name: Install API Dependencies
run: |
npm install --ignore-scripts
npx lerna bootstrap --no-ci --scope @opentelemetry/api --include-dependencies

- name: Build 🔧
run: |
npx lerna run compile --scope @opentelemetry/api
npx lerna run docs

- name: Test Docs
run: npm run docs-test
4 changes: 4 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
run: npm install --ignore-scripts
- name: Boostrap Dependencies
run: npx lerna bootstrap --no-ci
- name: Build
run: npm run compile
- name: Unit tests
run: npm run test
- name: Report Coverage
Expand Down Expand Up @@ -58,6 +60,8 @@ jobs:
run: npm install --ignore-scripts
- name: Boostrap Dependencies
run: npx lerna bootstrap --no-ci
- name: Build
run: npm run compile
- name: Unit tests
run: npm run test:browser
- name: Report Coverage
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/w3c-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v2

- name: Install and Build 🔧
- name: Install
run: |
npm install --ignore-scripts
npx lerna bootstrap --scope=propagation-validation-server --include-dependencies
npx lerna bootstrap --no-ci --scope=propagation-validation-server --include-dependencies

- name: Build 🔧
run: npm run compile
working-directory: ./integration-tests/propagation-validation-server

- name: Run W3C Test harness
run: ./integration-tests/tracecontext-integration-test.sh
18 changes: 18 additions & 0 deletions backwards-compatability/node10/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.es5.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "build"
},
"include": [
"index.ts"
],
"references": [
{
"path": "../../packages/opentelemetry-sdk-node"
},
{
"path": "../../packages/opentelemetry-tracing"
}
]
}
18 changes: 18 additions & 0 deletions backwards-compatability/node12/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.es5.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "build"
},
"include": [
"index.ts"
],
"references": [
{
"path": "../../packages/opentelemetry-sdk-node"
},
{
"path": "../../packages/opentelemetry-tracing"
}
]
}
18 changes: 18 additions & 0 deletions backwards-compatability/node8/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.es5.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "build"
},
"include": [
"index.ts"
],
"references": [
{
"path": "../../packages/opentelemetry-sdk-node"
},
{
"path": "../../packages/opentelemetry-tracing"
}
]
}
6 changes: 6 additions & 0 deletions integration-tests/propagation-validation-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"repository": "open-telemetry/opentelemetry-js",
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"scripts": {
"compile": "tsc --build"
},
"dependencies": {
"@opentelemetry/api": "^0.13.0",
"@opentelemetry/context-async-hooks": "^0.13.0",
Expand All @@ -15,5 +18,8 @@
"axios": "0.21.0",
"body-parser": "1.19.0",
"express": "4.17.1"
},
"devDependencies": {
"typescript": "3.9.7"
}
}
22 changes: 22 additions & 0 deletions integration-tests/propagation-validation-server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "build"
},
"include": [],
"references": [
{
"path": "../../packages/opentelemetry-api"
},
{
"path": "../../packages/opentelemetry-context-async-hooks"
},
{
"path": "../../packages/opentelemetry-core"
},
{
"path": "../../packages/opentelemetry-tracing"
}
]
}
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"scripts": {
"compile": "tsc --build",
"clean": "tsc --build --clean",
"bench": "node benchmark",
"clean": "lerna run clean",
"postinstall": "npm run bootstrap",
"precompile": "tsc --version",
"postinstall": "update-ts-references && npm run bootstrap",
"postcompile": "npm run submodule && npm run protos:copy",
"submodule": "git submodule sync --recursive && git submodule update --init --recursive",
"protos:copy": "lerna run protos:copy",
"version:update": "lerna run version:update",
"compile": "lerna run compile",
"test": "lerna run test",
"test:browser": "lerna run test:browser",
"test:backcompat": "lerna run test:backcompat",
"bootstrap": "lerna bootstrap",
"bump": "lerna publish",
"codecov": "lerna run codecov",
"codecov:browser": "lerna run codecov:browser",
"changelog": "lerna-changelog",
"predocs-test": "npm run docs",
"docs-test": "lerna run docs-test",
"docs": "lerna run docs",
Expand Down Expand Up @@ -57,7 +57,8 @@
"lerna": "3.22.1",
"lerna-changelog": "1.0.1",
"markdownlint-cli": "0.25.0",
"typescript": "3.9.7"
"typescript": "3.9.7",
"update-ts-references": "^1.3.0"
},
"husky": {
"hooks": {
Expand Down
9 changes: 4 additions & 5 deletions packages/opentelemetry-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@
},
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"compile": "tsc --build",
"clean": "tsc --build --clean",
"test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts",
"test:browser": "nyc karma start --single-run",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../",
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../",
"build": "npm run compile",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version",
"version:update": "node ../../scripts/version-update.js",
"compile": "npm run version:update && tsc -p .",
"version": "node ../../scripts/version-update.js",
"docs-test": "linkinator docs/out --silent --skip david-dm.org",
"docs": "typedoc --tsconfig tsconfig.json --exclude test/**/*.ts",
"prepare": "npm run compile",
"docs": "typedoc --tsconfig tsconfig.docs.json",
"watch": "tsc -w"
},
"keywords": [
Expand Down
15 changes: 15 additions & 0 deletions packages/opentelemetry-api/tsconfig.docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"rootDir": ".",
"outDir": "build"
},
"include": [
"src/**/*.ts"
],
"typedocOptions": {
"name": "OpenTelemetry API for JavaScript",
"out": "docs/out",
"mode": "file",
"hideGenerator": true
}
}
13 changes: 6 additions & 7 deletions packages/opentelemetry-api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.es5",
"extends": "../../tsconfig.es5.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "build"
Expand All @@ -8,10 +8,9 @@
"src/**/*.ts",
"test/**/*.ts"
],
"typedocOptions": {
"name": "OpenTelemetry API for JavaScript",
"out": "docs/out",
"mode": "file",
"hideGenerator": true
}
"references": [
{
"path": "../opentelemetry-context-base"
}
]
}
8 changes: 3 additions & 5 deletions packages/opentelemetry-context-async-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"compile": "tsc --build",
"clean": "tsc --build --clean",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../",
"clean": "rimraf build/*",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version",
"version:update": "node ../../scripts/version-update.js",
"compile": "npm run version:update && tsc -p .",
"prepare": "npm run compile"
"version": "node ../../scripts/version-update.js"
},
"keywords": [
"opentelemetry",
Expand Down
7 changes: 6 additions & 1 deletion packages/opentelemetry-context-async-hooks/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
{
"extends": "../tsconfig.base",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "build"
},
"include": [
"src/**/*.ts",
"test/**/*.ts"
],
"references": [
{
"path": "../opentelemetry-context-base"
}
]
}
8 changes: 3 additions & 5 deletions packages/opentelemetry-context-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"compile": "tsc --build",
"clean": "tsc --build --clean",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../",
"clean": "rimraf build/*",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version",
"version:update": "node ../../scripts/version-update.js",
"compile": "npm run version:update && tsc -p .",
"prepare": "npm run compile",
"version": "node ../../scripts/version-update.js",
"watch": "tsc -w"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-context-base/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.es5",
"extends": "../../tsconfig.es5.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "build"
Expand Down
7 changes: 3 additions & 4 deletions packages/opentelemetry-context-zone-peer-dep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"compile": "tsc --build",
"clean": "tsc --build --clean",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"clean": "rimraf build/*",
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../",
"version:update": "node ../../scripts/version-update.js",
"compile": "npm run version:update && tsc -p .",
"prepare": "npm run compile",
"version": "node ../../scripts/version-update.js",
"tdd": "karma start",
"test:browser": "nyc karma start --single-run",
"watch": "tsc -w"
Expand Down
Loading