build(aio): serve gzipped content from the preview server

Fixes #16699
This commit is contained in:
Georgios Kalpakas 2017-05-11 00:22:16 +03:00 committed by Pete Bacon Darwin
parent 67dc970ce4
commit c757e5794f
4 changed files with 7 additions and 6 deletions

View File

@ -27,6 +27,10 @@ server {
disable_symlinks on from=$document_root;
index index.html;
gzip on;
gzip_comp_level 7;
gzip_types *;
access_log {{$AIO_NGINX_LOGS_DIR}}/access.log;
error_log {{$AIO_NGINX_LOGS_DIR}}/error.log;

View File

@ -34,6 +34,6 @@ if [ $httpCode -lt 200 ] || ([ $httpCode -ge 400 ] && [ $httpCode -ne 409 ]); th
fi
# Run PWA-score tests
yarn test-pwa-score -- "$DEPLOYED_URL" "$MIN_PWA_SCORE_PREVIEW"
yarn test-pwa-score -- "$DEPLOYED_URL" "$MIN_PWA_SCORE"
cd -

View File

@ -19,6 +19,6 @@ firebase deploy --message "Commit: $TRAVIS_COMMIT" --non-interactive --token "$F
# Run PWA-score tests
# TODO(gkalpak): Figure out why this fails and re-enable.
sleep 10
yarn test-pwa-score -- "$DEPLOYED_URL" "$MIN_PWA_SCORE_STAGING" || true
yarn test-pwa-score -- "$DEPLOYED_URL" "$MIN_PWA_SCORE" || true
cd -

View File

@ -59,10 +59,7 @@ if [[ ${TRAVIS:-} ]]; then
setEnvVar KARMA_JS_BROWSERS `node -e "console.log(require('/home/travis/build/angular/angular/browser-providers.conf').browserstackAliases.CI_OPTIONAL.join(','))"`
;;
aio)
# Due to network latency/server performance, the min accepted PWA score
# on previews is a little lower than on staging.
setEnvVar MIN_PWA_SCORE_PREVIEW 93
setEnvVar MIN_PWA_SCORE_STAGING 95
setEnvVar MIN_PWA_SCORE 95
;;
esac
else