mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
chore: add extract_metadata task to CI (#859)
This commit is contained in:
@@ -11,8 +11,6 @@ source scripts/ci/sources/mode.sh
|
||||
source scripts/ci/sources/tunnel.sh
|
||||
|
||||
start_tunnel
|
||||
npm run build
|
||||
npm run inline-resources
|
||||
|
||||
wait_for_tunnel
|
||||
if is_lint; then
|
||||
@@ -20,6 +18,8 @@ if is_lint; then
|
||||
npm run ci:forbidden-identifiers
|
||||
npm run stylelint
|
||||
elif is_circular_deps_check; then
|
||||
# Build first because madge needs the JavaScript output.
|
||||
ng build
|
||||
npm run check-circular-deps
|
||||
elif is_e2e; then
|
||||
# Start up the e2e app. This will take some time.
|
||||
@@ -32,12 +32,24 @@ elif is_e2e; then
|
||||
echo "Waiting for e2e app to start"
|
||||
while [ ! -f ./dist/components/button/button.js ]; do
|
||||
sleep 2
|
||||
echo -n ".."
|
||||
done
|
||||
|
||||
echo "\nInlining resources"
|
||||
npm run inline-resources
|
||||
|
||||
# Run the e2e tests on the served e2e app.
|
||||
echo "Starting e2e tests"
|
||||
ng e2e
|
||||
elif is_extract_metadata; then
|
||||
# Run `tsc` first so that the directory structure in dist/ matches what ngc expects.
|
||||
./node_modules/.bin/tsc -p ./src/demo-app/
|
||||
./node_modules/.bin/ngc -p ./src/demo-app/
|
||||
else
|
||||
# Unit tests
|
||||
npm run build
|
||||
npm run inline-resources
|
||||
|
||||
karma start test/karma.conf.js --single-run --no-auto-watch --reporters='dots'
|
||||
fi
|
||||
teardown_tunnel
|
||||
|
||||
@@ -12,3 +12,7 @@ is_lint() {
|
||||
is_circular_deps_check() {
|
||||
[[ "$MODE" = circular_deps ]]
|
||||
}
|
||||
|
||||
is_extract_metadata() {
|
||||
[[ "$MODE" = extract_metadata ]]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user