test(bazel): integration test for ng new with Bazel (#27659)
integration test for bazel build and bazel test PR Close #27659
This commit is contained in:
parent
5902a4629c
commit
3680aef801
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"name": "bazel-schematics",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@angular/bazel": "file:../../dist/packages-dist/bazel",
|
||||
"@angular/cli": "^7.1.3",
|
||||
"@angular/core": "^7.1.3",
|
||||
"@bazel/bazel": "file:../../node_modules/@bazel/bazel"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "./test.sh"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eux -o pipefail
|
||||
|
||||
function test() {
|
||||
# Set up
|
||||
bazel version
|
||||
rm -rf demo
|
||||
# Create project
|
||||
ng new demo --collection=@angular/bazel --defaults --skip-git
|
||||
cd demo
|
||||
# TODO(kyliau): Use bazel commands directly for now. Once 7.1.4 is out we can
|
||||
# switch to use builders (ng build and ng test)
|
||||
# Run build
|
||||
bazel build //src:bundle
|
||||
# Run test
|
||||
bazel test \
|
||||
//src:test \
|
||||
//e2e:devserver_test \
|
||||
//e2e:prodserver_test
|
||||
}
|
||||
|
||||
test
|
File diff suppressed because it is too large
Load Diff
|
@ -88,6 +88,7 @@ ts_library(
|
|||
deps = [
|
||||
"@angular//packages/core/testing",
|
||||
"@angular//packages/platform-browser-dynamic/testing",
|
||||
"@npm//@types",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ function addDevDependenciesToPackageJson(options: Schema) {
|
|||
const devDependencies: {[k: string]: string} = {
|
||||
'@angular/bazel': angularCoreVersion,
|
||||
// TODO(kyliau): Consider moving this to latest-versions.ts
|
||||
'@bazel/karma': '^0.21.0',
|
||||
'@bazel/typescript': '^0.21.0',
|
||||
'@bazel/karma': '^0.22.0',
|
||||
'@bazel/typescript': '^0.22.0',
|
||||
};
|
||||
|
||||
const recorder = host.beginUpdate(packageJson);
|
||||
|
|
Loading…
Reference in New Issue