Skip to content

Commit 4b5ff69

Browse files
committed
make a separate workflow for firebase namespace test
1 parent 73f817c commit 4b5ff69

File tree

2 files changed

+33
-17
lines changed

2 files changed

+33
-17
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test Firebase Namespace
2+
3+
on: pull_request
4+
5+
jobs:
6+
test:
7+
name: Test Firebase Namespace
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: yarn build
29+
run: yarn build
30+
- name: Run tests on changed packages
31+
run: xvfb-run yarn lerna --scope firebase-namespace-integration-test test:ci

scripts/ci-test/run_changed_no_firestore.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,18 @@
1818
import { runTests, getTestTasks, createTestTask } from './run_changed';
1919
import { buildForTests } from './build';
2020

21-
/**
22-
* Always run tests in these paths.
23-
*/
24-
const alwaysRunTestPackages = [
25-
// These tests are very fast.
26-
'firebase-namespace-integration-test'
27-
];
28-
2921
const ignoredPackages = [
3022
'@firebase/firestore',
3123
'firebase-firestore-integration-test',
32-
'firebase-messaging-integration-test'
24+
'firebase-messaging-integration-test',
25+
'firebase-namespace-integration-test'
3326
];
3427

3528
async function run() {
3629
let testTasks = await getTestTasks();
3730

38-
// add alwaysRunTestPackages to tests if they don't already have a task
39-
for (const packageToTest of alwaysRunTestPackages) {
40-
if (!testTasks.find(t => t.pkgName === packageToTest)) {
41-
testTasks.push(createTestTask(packageToTest));
42-
}
43-
}
44-
4531
// remove the ignored packages from the tasks
4632
testTasks = testTasks.filter(t => !ignoredPackages.includes(t.pkgName));
47-
console.log(testTasks);
4833
await buildForTests(testTasks);
4934

5035
runTests(testTasks);

0 commit comments

Comments
 (0)