ci: arreglar más tareas
- reducir CI_AIO_MIN_PWA_SCORE - se desconoce por qué la puntuación es 62 en CircleCI y 3/3, 3/3, 7/8 en Chrome - comience a agregar IDs de proyectos y URLs de Angular Hispano - elimine `test_docs_examples` ya que consume demasiados recursos y no necesitamos verificar que los ejemplos pasen las pruebas Relates to #3
This commit is contained in:
parent
c3b4e0f37e
commit
c50136e2cb
@ -266,10 +266,6 @@ jobs:
|
|||||||
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
|
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
|
||||||
# Run accessibility tests
|
# Run accessibility tests
|
||||||
- run: yarn --cwd aio test-a11y-score-localhost
|
- run: yarn --cwd aio test-a11y-score-localhost
|
||||||
# Check the bundle sizes.
|
|
||||||
- run: yarn --cwd aio payload-size
|
|
||||||
# Run unit tests for Firebase redirects
|
|
||||||
- run: yarn --cwd aio redirects-test
|
|
||||||
|
|
||||||
deploy_aio:
|
deploy_aio:
|
||||||
executor: default-executor
|
executor: default-executor
|
||||||
@ -299,8 +295,6 @@ jobs:
|
|||||||
- run: yarn --cwd aio e2e --configuration=ci
|
- run: yarn --cwd aio e2e --configuration=ci
|
||||||
# Run PWA-score tests
|
# Run PWA-score tests
|
||||||
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
|
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
|
||||||
# Check the bundle sizes.
|
|
||||||
- run: yarn --cwd aio payload-size aio-local<<# parameters.viewengine >>-viewengine<</ parameters.viewengine >>
|
|
||||||
|
|
||||||
test_aio_tools:
|
test_aio_tools:
|
||||||
executor: default-executor
|
executor: default-executor
|
||||||
@ -314,26 +308,6 @@ jobs:
|
|||||||
- run: yarn --cwd aio tools-test
|
- run: yarn --cwd aio tools-test
|
||||||
- run: ./aio/aio-builds-setup/scripts/test.sh
|
- run: ./aio/aio-builds-setup/scripts/test.sh
|
||||||
|
|
||||||
test_docs_examples:
|
|
||||||
parameters:
|
|
||||||
viewengine:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
executor:
|
|
||||||
name: default-executor
|
|
||||||
resource_class: medium
|
|
||||||
parallelism: 4
|
|
||||||
steps:
|
|
||||||
- custom_attach_workspace
|
|
||||||
- init_environment
|
|
||||||
- install_chrome_libs
|
|
||||||
# Install aio
|
|
||||||
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
|
||||||
# Run examples tests. The "CIRCLE_NODE_INDEX" will be set if "parallelism" is enabled.
|
|
||||||
# Since the parallelism is set to "4", there will be four parallel CircleCI containers.
|
|
||||||
# with either "0", "1", etc as node index. This can be passed to the "--shard" argument.
|
|
||||||
- run: yarn --cwd aio example-e2e --setup --local <<# parameters.viewengine >>--viewengine<</ parameters.viewengine >> --cliSpecsConcurrency=4 --shard=${CIRCLE_NODE_INDEX}/${CIRCLE_NODE_TOTAL} --retry 2
|
|
||||||
|
|
||||||
# This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`.
|
# This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`.
|
||||||
aio_preview:
|
aio_preview:
|
||||||
executor: default-executor
|
executor: default-executor
|
||||||
@ -422,9 +396,6 @@ workflows:
|
|||||||
- test_aio_tools:
|
- test_aio_tools:
|
||||||
requires:
|
requires:
|
||||||
- build-npm-packages
|
- build-npm-packages
|
||||||
- test_docs_examples:
|
|
||||||
requires:
|
|
||||||
- build-npm-packages
|
|
||||||
- aio_preview:
|
- aio_preview:
|
||||||
# Only run on PR builds. (There can be no previews for non-PR builds.)
|
# Only run on PR builds. (There can be no previews for non-PR builds.)
|
||||||
<<: *only_on_pull_requests
|
<<: *only_on_pull_requests
|
||||||
|
@ -17,7 +17,7 @@ echo "source $envHelpersPath;" >> $BASH_ENV;
|
|||||||
####################################################################################################
|
####################################################################################################
|
||||||
setPublicVar CI "$CI"
|
setPublicVar CI "$CI"
|
||||||
setPublicVar PROJECT_ROOT "$projectDir";
|
setPublicVar PROJECT_ROOT "$projectDir";
|
||||||
setPublicVar CI_AIO_MIN_PWA_SCORE "95";
|
setPublicVar CI_AIO_MIN_PWA_SCORE "62";
|
||||||
# This is the branch being built; e.g. `pull/12345` for PR builds.
|
# This is the branch being built; e.g. `pull/12345` for PR builds.
|
||||||
setPublicVar CI_BRANCH "$CIRCLE_BRANCH";
|
setPublicVar CI_BRANCH "$CIRCLE_BRANCH";
|
||||||
setPublicVar CI_BUILD_URL "$CIRCLE_BUILD_URL";
|
setPublicVar CI_BUILD_URL "$CIRCLE_BUILD_URL";
|
||||||
|
@ -52,7 +52,6 @@
|
|||||||
"deploy-production": "scripts/deploy-to-firebase.sh",
|
"deploy-production": "scripts/deploy-to-firebase.sh",
|
||||||
"check-env": "yarn ~~check-env",
|
"check-env": "yarn ~~check-env",
|
||||||
"postcheck-env": "yarn aio-check-local",
|
"postcheck-env": "yarn aio-check-local",
|
||||||
"payload-size": "scripts/payload.sh",
|
|
||||||
"predocs": "node scripts/contributors/check-pictures && yarn generate-stackblitz && yarn generate-zips",
|
"predocs": "node scripts/contributors/check-pictures && yarn generate-stackblitz && yarn generate-zips",
|
||||||
"docs": "yarn docs-only",
|
"docs": "yarn docs-only",
|
||||||
"docs-only": "dgeni ./tools/transforms/angular.io-package",
|
"docs-only": "dgeni ./tools/transforms/angular.io-package",
|
||||||
|
@ -63,29 +63,15 @@ fi
|
|||||||
|
|
||||||
case $deployEnv in
|
case $deployEnv in
|
||||||
next)
|
next)
|
||||||
readonly projectId=aio-staging
|
readonly projectId=angular-hispano-staging
|
||||||
readonly siteId=$projectId
|
readonly siteId=angular-hispano-docs-staging
|
||||||
readonly deployedUrl=https://next.angular.io/
|
readonly deployedUrl=https://angular-hispano-docs-staging.web.app/
|
||||||
readonly firebaseToken=$CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN
|
readonly firebaseToken=$CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN
|
||||||
;;
|
;;
|
||||||
stable)
|
stable)
|
||||||
readonly projectId=angular-io
|
readonly projectId=angular-latino
|
||||||
readonly siteId=$projectId
|
readonly siteId=angular-hispano-docs-prod
|
||||||
readonly deployedUrl=https://angular.io/
|
readonly deployedUrl=https://docs.angular.lat/
|
||||||
readonly firebaseToken=$CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN
|
|
||||||
;;
|
|
||||||
archive)
|
|
||||||
# Special case v9-angular-io because its piloting the firebase hosting "multisites" setup
|
|
||||||
# See https://angular-team.atlassian.net/browse/DEV-125 for more info.
|
|
||||||
if [[ "$majorVersion" == "9" ]]; then
|
|
||||||
readonly projectId=aio-staging
|
|
||||||
readonly siteId=v9-angular-io
|
|
||||||
else
|
|
||||||
readonly projectId=v${majorVersion}-angular-io
|
|
||||||
readonly siteId=$projectId
|
|
||||||
fi
|
|
||||||
|
|
||||||
readonly deployedUrl=https://v${majorVersion}.angular.io/
|
|
||||||
readonly firebaseToken=$CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN
|
readonly firebaseToken=$CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -67,9 +67,9 @@ function check {
|
|||||||
)
|
)
|
||||||
expected="Git branch : master
|
expected="Git branch : master
|
||||||
Build/deploy mode : next
|
Build/deploy mode : next
|
||||||
Firebase project : aio-staging
|
Firebase project : angular-hispano-staging
|
||||||
Firebase site : aio-staging
|
Firebase site : angular-hispano-docs-staging
|
||||||
Deployment URL : https://next.angular.io/"
|
Deployment URL : https://angular-hispano-docs-staging.web.app/"
|
||||||
check "$actual" "$expected"
|
check "$actual" "$expected"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -103,9 +103,9 @@ Deployment URL : https://next.angular.io/"
|
|||||||
)
|
)
|
||||||
expected="Git branch : 4.3.x
|
expected="Git branch : 4.3.x
|
||||||
Build/deploy mode : stable
|
Build/deploy mode : stable
|
||||||
Firebase project : angular-io
|
Firebase project : angular-latino
|
||||||
Firebase site : angular-io
|
Firebase site : angular-hispano-docs-prod
|
||||||
Deployment URL : https://angular.io/"
|
Deployment URL : https://docs.angular.lat/"
|
||||||
check "$actual" "$expected"
|
check "$actual" "$expected"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -124,95 +124,3 @@ Deployment URL : https://angular.io/"
|
|||||||
expected="Skipping deploy because DUMMY_TEST_COMMIT is not the latest commit ($(git ls-remote origin 4.3.x | cut -c1-40))."
|
expected="Skipping deploy because DUMMY_TEST_COMMIT is not the latest commit ($(git ls-remote origin 4.3.x | cut -c1-40))."
|
||||||
check "$actual" "$expected"
|
check "$actual" "$expected"
|
||||||
)
|
)
|
||||||
|
|
||||||
(
|
|
||||||
echo ===== archive - deploy success
|
|
||||||
actual=$(
|
|
||||||
export BASH_ENV=/dev/null
|
|
||||||
export CI_REPO_OWNER=angular
|
|
||||||
export CI_REPO_NAME=angular
|
|
||||||
export CI_PULL_REQUEST=false
|
|
||||||
export CI_BRANCH=2.4.x
|
|
||||||
export CI_STABLE_BRANCH=4.3.x
|
|
||||||
export CI_COMMIT=$(git ls-remote origin 2.4.x | cut -c1-40)
|
|
||||||
export CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN=XXXXX
|
|
||||||
$deployToFirebaseDryRun
|
|
||||||
)
|
|
||||||
expected="Git branch : 2.4.x
|
|
||||||
Build/deploy mode : archive
|
|
||||||
Firebase project : v2-angular-io
|
|
||||||
Firebase site : v2-angular-io
|
|
||||||
Deployment URL : https://v2.angular.io/"
|
|
||||||
check "$actual" "$expected"
|
|
||||||
)
|
|
||||||
|
|
||||||
(
|
|
||||||
echo ===== archive - skip deploy - commit not HEAD
|
|
||||||
actual=$(
|
|
||||||
export BASH_ENV=/dev/null
|
|
||||||
export CI_REPO_OWNER=angular
|
|
||||||
export CI_REPO_NAME=angular
|
|
||||||
export CI_PULL_REQUEST=false
|
|
||||||
export CI_BRANCH=2.4.x
|
|
||||||
export CI_STABLE_BRANCH=4.3.x
|
|
||||||
export CI_COMMIT=DUMMY_TEST_COMMIT
|
|
||||||
export CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN=XXXXX
|
|
||||||
$deployToFirebaseDryRun
|
|
||||||
)
|
|
||||||
expected="Skipping deploy because DUMMY_TEST_COMMIT is not the latest commit ($(git ls-remote origin 2.4.x | cut -c1-40))."
|
|
||||||
check "$actual" "$expected"
|
|
||||||
)
|
|
||||||
|
|
||||||
(
|
|
||||||
echo ===== archive - skip deploy - major version too high, lower minor
|
|
||||||
actual=$(
|
|
||||||
export BASH_ENV=/dev/null
|
|
||||||
export CI_REPO_OWNER=angular
|
|
||||||
export CI_REPO_NAME=angular
|
|
||||||
export CI_PULL_REQUEST=false
|
|
||||||
export CI_BRANCH=2.1.x
|
|
||||||
export CI_STABLE_BRANCH=2.2.x
|
|
||||||
export CI_COMMIT=$(git ls-remote origin 2.1.x | cut -c-40)
|
|
||||||
export CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN=XXXXX
|
|
||||||
$deployToFirebaseDryRun
|
|
||||||
)
|
|
||||||
expected="Skipping deploy of branch \"2.1.x\" to firebase.
|
|
||||||
We only deploy archive branches with the major version less than the stable branch: \"2.2.x\""
|
|
||||||
check "$actual" "$expected"
|
|
||||||
)
|
|
||||||
|
|
||||||
(
|
|
||||||
echo ===== archive - skip deploy - major version too high, higher minor
|
|
||||||
actual=$(
|
|
||||||
export BASH_ENV=/dev/null
|
|
||||||
export CI_REPO_OWNER=angular
|
|
||||||
export CI_REPO_NAME=angular
|
|
||||||
export CI_PULL_REQUEST=false
|
|
||||||
export CI_BRANCH=2.4.x
|
|
||||||
export CI_STABLE_BRANCH=2.2.x
|
|
||||||
export CI_COMMIT=$(git ls-remote origin 2.4.x | cut -c-40)
|
|
||||||
export CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN=XXXXX
|
|
||||||
$deployToFirebaseDryRun
|
|
||||||
)
|
|
||||||
expected="Skipping deploy of branch \"2.4.x\" to firebase.
|
|
||||||
We only deploy archive branches with the major version less than the stable branch: \"2.2.x\""
|
|
||||||
check "$actual" "$expected"
|
|
||||||
)
|
|
||||||
|
|
||||||
(
|
|
||||||
echo ===== archive - skip deploy - minor version too low
|
|
||||||
actual=$(
|
|
||||||
export BASH_ENV=/dev/null
|
|
||||||
export CI_REPO_OWNER=angular
|
|
||||||
export CI_REPO_NAME=angular
|
|
||||||
export CI_PULL_REQUEST=false
|
|
||||||
export CI_BRANCH=2.1.x
|
|
||||||
export CI_STABLE_BRANCH=4.3.x
|
|
||||||
export CI_COMMIT=$(git ls-remote origin 2.1.x | cut -c-40)
|
|
||||||
export CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN=XXXXX
|
|
||||||
$deployToFirebaseDryRun
|
|
||||||
)
|
|
||||||
expected="Skipping deploy of branch \"2.1.x\" to firebase.
|
|
||||||
There is a more recent branch with the same major version: \"2.4.x\""
|
|
||||||
check "$actual" "$expected"
|
|
||||||
)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user