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

ci: speed up PR unit-test run time #614

Merged
merged 18 commits into from Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/unit-test.yml
Expand Up @@ -103,17 +103,22 @@ jobs:
plugins/web/*/node_modules
propagators/*/node_modules
key: ${{ runner.os }}-${{ matrix.container }}-${{ hashFiles('**/package.json') }}
- name: Legacy Peer Dependencies for npm 7
if: matrix.container == 'node:16'
run: npm config set legacy-peer-deps=true
- name: Install Root Dependencies
run: npm install --ignore-scripts
- name: Fix npm cache permissions
run: chown -R 1001:121 "/github/home/.npm"
run: |
chown -R 1001:121 "/github/home/.npm"
[ -e /__w/opentelemetry-js-contrib/opentelemetry-js-contrib/package-lock.json ] && chown 1001:121 /__w/opentelemetry-js-contrib/opentelemetry-js-contrib/package-lock.json
- name: Bootstrap Dependencies
run: npx lerna bootstrap --no-ci
run: npx lerna bootstrap --no-ci --hoist --nohoist='zone.js'
- name: Unit tests
run: npm run test
run: npm run test:ci:changed
- name: Report Coverage
if: matrix.container == 'node:14'
run: npm run codecov
run: npm run codecov:ci:changed
browser-tests:
runs-on: ubuntu-latest
container:
Expand Down
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -18,10 +18,12 @@
"version:update": "lerna run version:update",
"compile": "lerna run compile",
"test": "lerna run test",
"test:ci:changed": "lerna run test --since origin/main --parallel",
"test:browser": "lerna run test:browser",
"bootstrap": "lerna bootstrap --no-ci",
dyladan marked this conversation as resolved.
Show resolved Hide resolved
"bump": "lerna publish",
"codecov": "lerna run codecov",
"codecov:ci:changed": "lerna run codecov --since origin/main --parallel",
"codecov:browser": "lerna run codecov:browser",
"changelog": "lerna-changelog",
"lint": "lerna run lint",
Expand Down