parent
92984ba794
commit
a33ff2c68f
|
@ -62,7 +62,7 @@ jobs:
|
|||
# Use bazel query so that we explicitly ask for all buildable targets to be built as well
|
||||
# This avoids waiting for a build command to finish before running the first test
|
||||
# See https://github.com/bazelbuild/bazel/issues/4257
|
||||
- run: bazel query --output=label '//modules/... union //packages/... union @angular//...' | xargs bazel test --config=ci
|
||||
- run: bazel query --output=label '//modules/... union //packages/... union //tools/... union @angular//...' | xargs bazel test --config=ci
|
||||
|
||||
- save_cache:
|
||||
key: *cache_key
|
||||
|
|
|
@ -20,6 +20,7 @@ The components have a clear piece of source code associated with it within the `
|
|||
* `comp: common/http` - this includes core components / pipes
|
||||
* `comp: core & compiler` - because core, compiler, compiler-cli and
|
||||
browser-platforms are very intertwined, we will be treating them as one
|
||||
* `comp: ivy` - a subset of core representing the new Ivy renderer.
|
||||
* `comp: forms`
|
||||
* `comp: http`
|
||||
* `comp: i18n`
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
|
||||
|
||||
jasmine_node_test(
|
||||
name = "validate-commit-message",
|
||||
srcs = glob(["*.js"]),
|
||||
)
|
|
@ -23,6 +23,7 @@
|
|||
"core",
|
||||
"forms",
|
||||
"http",
|
||||
"ivy",
|
||||
"language-service",
|
||||
"platform-browser",
|
||||
"platform-browser-dynamic",
|
||||
|
|
|
@ -58,3 +58,5 @@ module.exports = function(commitSubject) {
|
|||
function error(errorMessage, commitMessage) {
|
||||
console.error(`INVALID COMMIT MSG: "${commitMessage}"\n => ERROR: ${errorMessage}`);
|
||||
}
|
||||
|
||||
module.exports.config = config;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
describe('validate-commit-message.js', function() {
|
||||
var validateMessage = require('./validate-commit-message');
|
||||
var SCOPES = validateMessage.config.scopes.join(', ');
|
||||
var errors = [];
|
||||
var logs = [];
|
||||
|
||||
|
@ -51,22 +52,22 @@ describe('validate-commit-message.js', function() {
|
|||
expect(validateMessage('refactor(docs): something')).toBe(INVALID);
|
||||
['INVALID COMMIT MSG: "fix(Compiler): something"\n' +
|
||||
' => ERROR: "Compiler" is not an allowed scope.\n' +
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog',
|
||||
' => SCOPES: ' + SCOPES,
|
||||
'INVALID COMMIT MSG: "feat(bah): something"\n' +
|
||||
' => ERROR: "bah" is not an allowed scope.\n' +
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog',
|
||||
' => SCOPES: ' + SCOPES,
|
||||
'INVALID COMMIT MSG: "style(webworker): something"\n' +
|
||||
' => ERROR: "webworker" is not an allowed scope.\n' +
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog',
|
||||
' => SCOPES: ' + SCOPES,
|
||||
'INVALID COMMIT MSG: "refactor(security): something"\n' +
|
||||
' => ERROR: "security" is not an allowed scope.\n' +
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog',
|
||||
' => SCOPES: ' + SCOPES,
|
||||
'INVALID COMMIT MSG: "refactor(docs): something"\n' +
|
||||
' => ERROR: "docs" is not an allowed scope.\n' +
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog']
|
||||
.forEach((expectedErrorMessage, index) => {
|
||||
expect(expectedErrorMessage).toEqual(errors[index]);
|
||||
});
|
||||
' => SCOPES: ' + SCOPES,
|
||||
].forEach((expectedErrorMessage, index) => {
|
||||
expect(expectedErrorMessage).toEqual(errors[index]);
|
||||
});
|
||||
expect(validateMessage('release(angular): something')).toBe(INVALID);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue