Skip to content

Optimize CI tests #3664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Aug 25, 2020
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/test-changed-firestore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test Firestore

on: pull_request

jobs:
test:
name: Test Firestore
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
- name: Set up Node (10)
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: install Chrome stable
run: |
sudo apt-get update
sudo apt-get install google-chrome-stable
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
yarn
- name: yarn build
run: yarn build
- name: Run tests on changed packages
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Run tests if firestore package has changed"?

run: xvfb-run yarn test:changed:firestore
36 changes: 0 additions & 36 deletions integration/browserify/karma.conf.js

This file was deleted.

26 changes: 0 additions & 26 deletions integration/browserify/package.json

This file was deleted.

34 changes: 0 additions & 34 deletions integration/browserify/src/namespace.test.js

This file was deleted.

30 changes: 0 additions & 30 deletions integration/firebase-typings/index.submodules.ts

This file was deleted.

30 changes: 0 additions & 30 deletions integration/firebase-typings/index.ts

This file was deleted.

13 changes: 0 additions & 13 deletions integration/firebase-typings/package.json

This file was deleted.

7 changes: 0 additions & 7 deletions integration/firebase-typings/tsconfig.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "firebase-typescript-test",
"name": "firebase-namespace-integration-test",
"private": true,
"version": "0.2.1",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/

import * as firebase from 'firebase';
import * as namespaceDefinition from '../../shared/namespaceDefinition.json';
import validateNamespace from '../../shared/validator';
import * as namespaceDefinition from './namespaceDefinition.json';
import validateNamespace from './validator';

firebase.initializeApp({
apiKey: 'test-api-key',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function validateNamespace(definition, candidate) {
describe('Firebase SDK Version', function () {
it('Should be properly defined', function () {
__expect(candidate.SDK_VERSION).to.equal(
require('../../packages/firebase/package.json').version
require('../../../packages/firebase/package.json').version
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion integration/messaging/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "firebase-messaging-selenium-test",
"name": "firebase-messaging-integration-test",
"private": true,
"version": "0.2.1",
"scripts": {
Expand Down
36 changes: 0 additions & 36 deletions integration/webpack/karma.conf.js

This file was deleted.

26 changes: 0 additions & 26 deletions integration/webpack/package.json

This file was deleted.

34 changes: 0 additions & 34 deletions integration/webpack/src/namespace.test.js

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"pretest:coverage": "mkdirp coverage",
"ci:coverage": "lcov-result-merger 'packages/**/lcov.info' 'lcov-all.info'",
"test:coverage": "lcov-result-merger 'packages/**/lcov.info' | coveralls",
"test:changed": "node scripts/run_changed.js",
"test:changed": "ts-node-script scripts/ci-test/run_changed_no_firestore.ts",
"test:changed:firestore": "ts-node-script scripts/ci-test/run_changed_firestore.ts",
"test:setup": "node tools/config.js",
"test:saucelabs": "node scripts/run_saucelabs.js",
"docgen:js": "node scripts/docgen/generate-docs.js --api js",
Expand Down Expand Up @@ -67,7 +68,6 @@
"@changesets/cli": "2.9.2",
"@microsoft/api-documenter": "7.8.21",
"@microsoft/api-extractor": "7.9.2",
"@types/mz": "2.7.1",
"@types/chai": "4.2.12",
"@types/chai-as-promised": "7.1.3",
"@types/child-process-promise": "2.2.1",
Expand Down
Loading