Skip to content

Commit b06b1cb

Browse files
committed
feat(root): make unit-test-changed work on out of date branches
BTC-0 TICKET: BTC-0
1 parent b503f20 commit b06b1cb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- uses: actions/checkout@v4
2424
with:
2525
ref: ${{ github.event.pull_request.head.sha }}
26+
fetch-depth: 0
2627

2728
- name: Setup node:${{ matrix.node-version }}
2829
uses: actions/setup-node@v2
@@ -86,7 +87,7 @@ jobs:
8687
fail-fast: false
8788
matrix:
8889
check: ['lint', 'format', 'commit-lint', 'dependencies']
89-
90+
9091
steps:
9192
- uses: actions/checkout@v4
9293
with:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"audit-dev": "yarn audit --group devDependencies ; test $? -lt 8",
9494
"lint": "lerna run lint --stream",
9595
"lint-changed": "lerna run lint --since origin/${GITHUB_REPO_BRANCH:-master}..HEAD --stream",
96-
"unit-test-changed": "lerna run unit-test --since origin/${GITHUB_REPO_BRANCH:-master}..HEAD --stream",
96+
"unit-test-changed": "lerna run unit-test --since $(git merge-base HEAD~ origin/${GITHUB_REPO_BRANCH:-master}) --stream",
9797
"browser-tests": "lerna run --scope bitgo compile && lerna run --scope bitgo browser-test && lerna run --scope @bitgo/web-demo test",
9898
"gen-coverage-changed": "lerna run gen-coverage --since origin/${GITHUB_REPO_BRANCH:-master}..HEAD --stream --parallel",
9999
"coverage-changed": "lerna run upload-coverage --since origin/${GITHUB_REPO_BRANCH:-master}..HEAD --stream --parallel --",

0 commit comments

Comments
 (0)