Skip to content

Commit 3d7f0d8

Browse files
committed
pass base in
1 parent 41bf67d commit 3d7f0d8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ jobs:
448448
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
449449

450450
- name: Run affected tests
451-
run: yarn test:pr:browser
451+
run: yarn test:pr:browser --base=${{ github.base_ref }}
452452
if: github.event_name == 'pull_request'
453453

454454
- name: Run all tests
@@ -542,7 +542,7 @@ jobs:
542542
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
543543

544544
- name: Run affected tests
545-
run: yarn test:pr:node
545+
run: yarn test:pr:node --base=${{ github.base_ref }}
546546
if: github.event_name == 'pull_request'
547547
env:
548548
NODE_VERSION: ${{ matrix.node }}

scripts/node-unit-tests.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,12 @@ function runWithIgnores(skipPackages: string[] = []): void {
7676
* Run affected tests, ignoring the given packages
7777
*/
7878
function runAffectedWithIgnores(skipPackages: string[] = []): void {
79+
const additionalArgs = process.argv
80+
.slice(2)
81+
.filter(arg => arg !== '--affected')
82+
.join(' ');
7983
const ignoreFlags = skipPackages.map(dep => `--exclude="${dep}"`).join(' ');
80-
run(`yarn test:pr ${ignoreFlags}`);
84+
run(`yarn test:pr ${ignoreFlags} ${additionalArgs}`);
8185
}
8286

8387
/**

0 commit comments

Comments
 (0)