Skip to content

Commit 96076f0

Browse files
authored
Optimize CI tests (#3664)
* remove unnecessary integration tests * exclude firestore tests from run_changed * fix bug * reduce the scope that triggers global tests * firestore only test changed * Put firestore tests into a separate workflow * rewrote run_changed scripts * fix things * create a separate workflow for FCM integration tests * Build only packages needed for testing (#3668) * build only packages needed for testing * ignore firebase and firebase-exp * revert yarn.lock * test app * make a separate workflow for firebase namespace test * early return if no test tasks * test fcm * Revert "test fcm" This reverts commit a0599e8. * Revert "test app" This reverts commit 73f817c. * put auxiliary libs into a separate workflow * test firebase * small change * update yarn.lock * fix obvious errors * fix script issues * run auth tests in a separate workflow * rename test name to make more sense on Github * try separating firestore and firestore integration into different workflows * run the correct script * refactor test changed * update words * remove unnecessary xvfb-run * add firebase to auth's dependency because auth test depends on it * build correctly * abort if build failed * build appExp * build all for auth
1 parent 39bc71b commit 96076f0

38 files changed

+700
-869
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test Auth
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: build
29+
run: yarn build
30+
- name: Run tests on changed packages
31+
run: xvfb-run yarn test:changed auth
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test FCM 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: build
29+
run: yarn build:changed fcm-integration --buildAppExp
30+
- name: Run tests if FCM or its dependenceies has changed
31+
run: xvfb-run yarn test:changed fcm-integration
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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: build
29+
run: yarn build:changed firestore-integration --buildAppExp
30+
- name: Run tests if firestore or its dependenceies has changed
31+
run: yarn test:changed firestore-integration
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test Firestore
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: build
29+
run: yarn build:changed firestore --buildAppExp
30+
- name: Run tests if firestore or its dependenceies has changed
31+
run: yarn test:changed firestore
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test rxFire, @firebase/testing and @firebase/rules-unit-testing
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: build
29+
run: yarn build:changed misc --buildAppExp
30+
- name: Run tests
31+
run: yarn test:changed misc

.github/workflows/test-changed.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: |
2626
cp config/ci.config.json config/project.json
2727
yarn
28-
- name: yarn build
29-
run: yarn build
28+
- name: build
29+
run: yarn build:changed core
3030
- name: Run tests on changed packages
31-
run: xvfb-run yarn test:changed
31+
run: xvfb-run yarn test:changed core
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: build
29+
run: yarn build:changed firebase-integration --buildAppExp
30+
- name: Run tests on changed packages
31+
run: yarn test:changed firebase-integration

integration/browserify/karma.conf.js

Lines changed: 0 additions & 36 deletions
This file was deleted.

integration/browserify/package.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

integration/browserify/src/namespace.test.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

integration/firebase-typings/index.submodules.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

integration/firebase-typings/index.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

integration/firebase-typings/package.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

integration/firebase-typings/tsconfig.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)