Skip to content

Commit 9703fbb

Browse files
committed
try separating firestore and firestore integration into different workflows
1 parent ad98505 commit 9703fbb

File tree

4 files changed

+61
-4
lines changed

4 files changed

+61
-4
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Test Firestore Integration
2+
3+
on: pull_request
4+
5+
jobs:
6+
test:
7+
name: If Changed
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout Repo
12+
uses: actions/checkout@master
13+
with:
14+
# This makes Actions fetch all Git history so run-changed script can diff properly.
15+
fetch-depth: 0
16+
- name: Set up Node (10)
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: 10.x
20+
- name: install Chrome stable
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install google-chrome-stable
24+
- name: Test setup and yarn install
25+
run: |
26+
cp config/ci.config.json config/project.json
27+
yarn
28+
- name: Run tests if firestore or its dependenceies has changed
29+
run: xvfb-run yarn test:changed:firestore

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"test:coverage": "lcov-result-merger 'packages/**/lcov.info' | coveralls",
4141
"test:changed": "ts-node-script scripts/ci-test/run_changed_core.ts",
4242
"test:changed:firestore": "ts-node-script scripts/ci-test/run_changed_firestore.ts",
43+
"test:changed:firestore:integration": "ts-node-script scripts/ci-test/run_changed_firestore_integration.ts",
4344
"test:changed:fcm": "ts-node-script scripts/ci-test/run_changed_fcm_integration.ts",
4445
"test:changed:auth": "ts-node-script scripts/ci-test/run_changed_auth.ts",
4546
"test:changed:auxiliary": "ts-node-script scripts/ci-test/run_changed_auxiliary_libs.ts",

scripts/ci-test/run_changed_firestore.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818
import { getTestTasks, runTests } from './run_changed';
1919
import { buildForTests } from './build';
2020

21-
const includeOnlyPackages = [
22-
'@firebase/firestore',
23-
'firebase-firestore-integration-test'
24-
];
21+
const includeOnlyPackages = ['@firebase/firestore'];
2522

2623
async function run() {
2724
let testTasks = await getTestTasks();
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* @license
3+
* Copyright 2020 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
import { getTestTasks, runTests } from './run_changed';
19+
import { buildForTests } from './build';
20+
21+
const includeOnlyPackages = ['firebase-firestore-integration-test'];
22+
23+
async function run() {
24+
let testTasks = await getTestTasks();
25+
testTasks = testTasks.filter(t => includeOnlyPackages.includes(t.pkgName));
26+
await buildForTests(testTasks, true);
27+
runTests(testTasks);
28+
}
29+
30+
run();

0 commit comments

Comments
 (0)