Skip to content

Commit 0809b3a

Browse files
committed
Setup separate jobs
1 parent 1aeb561 commit 0809b3a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/test-changed-firestore.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on: pull_request
55
jobs:
66
test-chrome:
77
name: Test Firestore on Chrome and Node If Changed
8+
strategy:
9+
matrix:
10+
test-name: ["test:browser", "test:travis", "test:lite:browser", "test:browser:prod:nameddb", "test:lite:browser:nameddb"]
11+
812
runs-on: ubuntu-latest
913

1014
steps:
@@ -30,7 +34,7 @@ jobs:
3034
- name: build
3135
run: yarn build:changed firestore
3236
- name: Run tests if firestore or its dependencies has changed
33-
run: yarn test:changed firestore
37+
run: yarn test:changed firestore ${{ matrix.test-name }}
3438

3539
test-firefox:
3640
name: Test Firestore on Firefox If Changed
@@ -62,6 +66,6 @@ jobs:
6266
- name: build
6367
run: yarn build:changed firestore
6468
- name: Run tests if firestore or its dependencies has changed
65-
run: xvfb-run yarn test:changed firestore
69+
run: xvfb-run yarn test:changed firestore ${{ matrix.test-name }}
6670
env:
6771
BROWSERS: 'Firefox'

scripts/ci-test/test_changed.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ const root = resolve(__dirname, '../..');
2525

2626
const argv = yargs.parseSync();
2727
const inputTestConfigName = argv._[0].toString();
28-
const testCommand = 'test:ci';
28+
let testCommand = 'test:ci';
29+
if (argv._.length > 1) {
30+
testCommand = argv._[1].toString();
31+
}
2932

3033
const allTestConfigNames = Object.keys(testConfig);
3134
if (!inputTestConfigName) {

0 commit comments

Comments
 (0)