Skip to content

Commit c072fb0

Browse files
committed
exclude lint from ci:test
1 parent b7a2a64 commit c072fb0

File tree

22 files changed

+60
-41
lines changed

22 files changed

+60
-41
lines changed

packages-exp/app-exp/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
"build:release": "rollup -c rollup.config.release.js && yarn api-report && yarn typings:public",
1717
"build:deps": "lerna run --scope @firebase/app-exp --include-dependencies build",
1818
"dev": "rollup -c -w",
19-
"test": "yarn type-check && run-p lint test:browser test:node",
20-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
19+
"test": "run-p lint test:all",
20+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
21+
"test:all": "run-p test:browser test:node",
2122
"test:browser": "karma start --single-run",
2223
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.ts --config ../../config/mocharc.node.js",
23-
"type-check": "tsc -p . --noEmit",
2424
"prepare": "rollup -c rollup.config.release.js && yarn api-report",
2525
"api-report": "api-extractor run --local --verbose",
2626
"predoc": "node ../../scripts/exp/remove-exp.js temp",

packages-exp/functions-exp/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"build:deps": "lerna run --scope @firebase/functions-exp --include-dependencies build",
1717
"build:release": "rollup -c rollup.config.release.js && yarn api-report",
1818
"dev": "rollup -c -w",
19-
"test": "yarn type-check && run-p lint test:browser test:node",
20-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
21-
"type-check": "tsc -p . --noEmit",
19+
"test": "run-p lint test:all",
20+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
21+
"test:all": "run-p test:browser test:node",
2222
"test:browser": "karma start --single-run",
2323
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
2424
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'src/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",

packages/analytics/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"build": "rollup -c",
1414
"build:deps": "lerna run --scope @firebase/'{app,analytics}' --include-dependencies build",
1515
"dev": "rollup -c -w",
16-
"test": "yarn run-p lint test:browser",
17-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
16+
"test": "run-p lint test:browser",
17+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
1818
"test:browser": "karma start --single-run --nocache",
1919
"prepare": "yarn build"
2020
},

packages/app/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
"build": "rollup -c",
1818
"build:deps": "lerna run --scope @firebase/app --include-dependencies build",
1919
"dev": "rollup -c -w",
20-
"test": "run-p lint test:browser test:node",
21-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
20+
"test": "run-p lint test:all",
21+
"test:all": "run-p test:browser test:node",
22+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
2223
"test:browser": "karma start --single-run",
2324
"test:browser:debug": "karma start --browsers Chrome --auto-watch",
2425
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --config ../../config/mocharc.node.js",

packages/component/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
"build": "rollup -c",
1515
"build:deps": "lerna run --scope @firebase/component --include-dependencies build",
1616
"dev": "rollup -c -w",
17-
"test": "run-p lint test:browser test:node",
18-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
17+
"test": "run-p lint test:all",
18+
"test:all": "run-p test:browser test:node",
19+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
1920
"test:browser": "karma start --single-run",
2021
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.ts --config ../../config/mocharc.node.js",
2122
"prepare": "yarn build"

packages/database/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"build:deps": "lerna run --scope @firebase/'{app,database}' --include-dependencies build",
1616
"dev": "rollup -c -w",
1717
"test": "run-p lint test:emulator",
18-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
18+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:emulator",
1919
"test:all": "run-p lint test:browser test:node",
2020
"test:browser": "karma start --single-run",
2121
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --config ../../config/mocharc.node.js",

packages/firestore/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"test:exp:browser": "karma start --single-run --exp",
3737
"test:exp:browser:debug": "karma start --single-run --exp --auto-watch",
3838
"test": "run-s lint test:all",
39-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
39+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
4040
"test:all": "run-p test:browser test:lite:browser test:exp:browser test:travis test:minified",
4141
"test:browser": "karma start --single-run",
4242
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",

packages/functions/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
"build": "rollup -c",
1515
"build:deps": "lerna run --scope @firebase/'{app,functions}' --include-dependencies build",
1616
"dev": "rollup -c -w",
17-
"test": "run-p lint test:browser test:node",
18-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
17+
"test": "run-p lint test:all",
18+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
19+
"test:all": "run-p test:browser test:node",
1920
"test:browser": "karma start --single-run",
2021
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
2122
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --config ../../config/mocharc.node.js",

packages/installations/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1313
"build": "rollup -c",
1414
"build:deps": "lerna run --scope @firebase/'{app,installations}' --include-dependencies build",
15-
"test": "yarn test:karma && yarn lint",
16-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
15+
"test": "run-p lint test:karma",
16+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:karma",
1717
"test:karma": "karma start --single-run",
1818
"test:debug": "karma start --browsers=Chrome --auto-watch",
1919
"serve": "yarn serve:build && yarn serve:host",

packages/logger/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
"build": "rollup -c",
1414
"build:deps": "lerna run --scope @firebase/logger --include-dependencies build",
1515
"dev": "rollup -c -w",
16-
"test": "run-p lint test:browser test:node",
17-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
16+
"test": "run-p lint test:all",
17+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
18+
"test:all": "run-p test:browser test:node",
1819
"test:browser": "karma start --single-run",
1920
"test:browser:debug": "karma start --browsers Chrome --auto-watch",
2021
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --config ../../config/mocharc.node.js",

packages/messaging/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"build": "rollup -c",
1414
"build:deps": "lerna run --scope @firebase/'{app,messaging}' --include-dependencies build",
1515
"dev": "rollup -c -w",
16-
"test": "test:karma",
16+
"test": "run-p lint test:karma",
1717
"test:integration": "test:karma && cd ../../integration/messaging && npm run-script test",
18-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
18+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:karma",
1919
"test:karma": "karma start --single-run",
2020
"test:debug": "karma start --browsers=Chrome --auto-watch",
2121
"prepare": "yarn build"

packages/performance/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"build:deps": "lerna run --scope @firebase/'{app,performance}' --include-dependencies build",
1616
"dev": "rollup -c -w",
1717
"test": "run-p lint test:browser",
18-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
18+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
1919
"test:browser": "karma start --single-run",
2020
"test:debug": "karma start --browsers=Chrome --auto-watch",
2121
"prepare": "yarn build",

packages/remote-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"build:deps": "lerna run --scope @firebase/'{app,remote-config}' --include-dependencies build",
1616
"dev": "rollup -c -w",
1717
"test": "run-p lint test:browser",
18-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
18+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
1919
"test:browser": "karma start --single-run",
2020
"test:debug": "karma start --browsers=Chrome --auto-watch",
2121
"prettier": "prettier --write '{src,test}/**/*.{js,ts}'",

packages/rules-unit-testing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"dev": "rollup -c -w",
1717
"test:nyc": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --config ../../config/mocharc.node.js",
1818
"test": "firebase --debug emulators:exec 'yarn test:nyc'",
19-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
19+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test",
2020
"prepare": "yarn build"
2121
},
2222
"license": "Apache-2.0",

packages/rxfire/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"dev": "rollup -c -w",
2929
"prepare": "yarn build",
3030
"test": "run-p lint test:browser",
31-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
31+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
3232
"test:browser": "karma start --single-run",
3333
"test:browser:debug": "karma start --browsers=Chrome --auto-watch"
3434
},

packages/storage/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"build:deps": "lerna run --scope @firebase/'{app,storage}' --include-dependencies build",
1515
"dev": "rollup -c -w",
1616
"test": "run-p test:browser lint",
17-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
17+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
1818
"test:browser:unit": "karma start --single-run --unit",
1919
"test:browser:integration": "karma start --single-run --integration",
2020
"test:browser": "karma start --single-run",

packages/template/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
"build": "rollup -c",
1818
"build:deps": "lerna run --scope @firebase/'{app,template}' --include-dependencies build",
1919
"dev": "rollup -c -w",
20-
"test": "run-p lint test:browser test:node",
21-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
20+
"test": "run-p lint test:all",
21+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
22+
"test:all": "run-p test:browser test:node",
2223
"test:browser": "karma start --single-run",
2324
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.* --config ../../config/mocharc.node.js",
2425
"prepare": "yarn build"

packages/testing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"dev": "rollup -c -w",
1515
"test:nyc": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --config ../../config/mocharc.node.js",
1616
"test": "firebase --debug emulators:exec 'yarn test:nyc'",
17-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
17+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test",
1818
"prepare": "yarn build"
1919
},
2020
"license": "Apache-2.0",

packages/util/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
"build": "rollup -c",
1515
"build:deps": "lerna run --scope @firebase/util --include-dependencies build",
1616
"dev": "rollup -c -w",
17-
"test": "run-p test:browser test:node",
18-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
17+
"test": "run-p lint test:all",
18+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
19+
"test:all": "run-p test:browser test:node",
1920
"test:browser": "karma start --single-run",
2021
"test:node": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --config ../../config/mocharc.node.js",
2122
"prepare": "yarn build"

repo-scripts/changelog-generator/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1414
"build": "tsc",
1515
"build:dev": "tsc -w",
16-
"test": "yarn type-check",
17-
"prepare": "yarn build",
18-
"type-check": "tsc -p . --noEmit"
16+
"test": "tsc -p . --noEmit",
17+
"prepare": "yarn build"
1918
},
2019
"dependencies": {
2120
"@changesets/types": "3.1.0",

repo-scripts/size-analysis/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1212
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1313
"pretest": "tsc -p test/test-inputs && rollup -c",
14-
"test": "yarn type-check && TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha **/*.test.ts --config ../../config/mocharc.node.js --timeout 60000",
15-
"test:ci": "node ../../scripts/run_tests_in_ci.js",
16-
"type-check": "tsc -p . --noEmit"
14+
"test": "run-p lint test:node",
15+
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:node",
16+
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha **/*.test.ts --config ../../config/mocharc.node.js --timeout 60000"
1717
},
1818
"dependencies": {
1919
"typescript": "3.9.7",

scripts/run_tests_in_ci.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,33 @@
1515
* limitations under the License.
1616
*/
1717

18-
const { argv } = require('yargs');
18+
const yargs = require('yargs');
1919
const path = require('path');
2020
const { spawn } = require('child-process-promise');
2121

22+
const argv = yargs.options({
23+
d: {
24+
type: 'string',
25+
desc: 'current working directory',
26+
default: '.'
27+
},
28+
s: {
29+
type: 'string',
30+
desc: 'the npm script to run',
31+
demandOption: true
32+
}
33+
}).argv;
34+
2235
(async () => {
23-
const myPath = argv._[0] || '.'; // default to the current directory
36+
const myPath = argv.d;
37+
const scriptName = argv.s;
2438
const dir = path.resolve(myPath);
2539
const { name } = require(`${dir}/package.json`);
2640

2741
let stdout = '';
2842
let stderr = '';
2943
try {
30-
const testProcess = spawn('yarn', ['--cwd', dir, 'test']);
44+
const testProcess = spawn('yarn', ['--cwd', dir, scriptName]);
3145

3246
testProcess.childProcess.stdout.on('data', data => {
3347
stdout += data.toString();

0 commit comments

Comments
 (0)