Files
angular/integration/bazel-schematics/test.sh
George Kalpakas fa130e9445 ci: pin ChromeDriver to a version compatible with docker image's Chrome (#28494)
By default, `webdriver-manager update` will download the latest
ChromeDriver version, which might not be compatible with the Chrome
version included in the [docker image used on CI], causing CI failures.
Previously, we used to pin the ChromeDriver version on CI in
[ngcontainer's Dockerfile][2]. This was accidentally broken in #26691,
while moving from ngcontainer to default CircleCI docker images.

This commit fixes the issue by pinning ChromeDriver to a known
compatible version.

[1]: bfd48d156d/.circleci/config.yml (L16)
[2]: bfd48d156d/tools/ngcontainer/Dockerfile (L63)

PR Close #28494
2019-02-01 20:22:04 -05:00

33 lines
891 B
Bash
Executable File

#!/usr/bin/env bash
set -eux -o pipefail
function testBazel() {
# Set up
bazel version
rm -rf demo
# Create project
ng new demo --collection=@angular/bazel --defaults --skip-git --style=scss
node replace_angular_repo.js "./demo/WORKSPACE"
cd demo
yarn add @angular/bazel@file:../../../dist/packages-dist/bazel
yarn webdriver-manager update --gecko=false --standalone=false $CI_CHROMEDRIVER_VERSION_ARG
cp ../package.json.replace ./package.json
ng generate component widget --style=css
ng build
ng test
ng e2e
}
function testNonBazel() {
# Replace angular.json that uses Bazel builder with the default generated by CLI
cp ../angular.json.original ./angular.json
rm -rf dist src/main.dev.ts src/main.prod.ts
ng build --progress=false
ng test --progress=false --watch=false
ng e2e --configuration=ci --webdriver-update=false
}
testBazel
testNonBazel