代码拉取完成,页面将自动刷新
version: 0.2
batch:
fast-fail: false
build-matrix:
static:
ignore-failure: false
env:
type: LINUX_CONTAINER
privileged-mode: true
compute-type: BUILD_GENERAL1_MEDIUM
dynamic:
env:
compute-type:
- BUILD_GENERAL1_MEDIUM
image:
- public.ecr.aws/cypress-io/cypress/browsers:node14.16.0-chrome90-ff88
variables:
CY_GROUP_SPEC:
- "UI - Chrome|chrome|cypress/tests/ui/*"
- "UI - Chrome - Mobile|chrome|cypress/tests/ui/*|viewportWidth=375,viewportHeight=667"
- "API|chrome|cypress/tests/api/*"
- "UI - Firefox|firefox|cypress/tests/ui/*"
- "UI - Firefox - Mobile|firefox|cypress/tests/ui/*|viewportWidth=375,viewportHeight=667"
WORKERS:
- 1
- 2
- 3
- 4
- 5
phases:
install:
commands:
# Set COMMIT_INFO variables to send Git specifics to Cypress Dashboard when recording
# https://docs.cypress.io/guides/continuous-integration/introduction#Git-information
- export COMMIT_INFO_BRANCH="$(git rev-parse HEAD | xargs git name-rev | cut -d' ' -f2 | sed 's/remotes\/origin\///g')"
- export COMMIT_INFO_MESSAGE="$(git log -1 --pretty=%B)"
- export COMMIT_INFO_EMAIL="$(git log -1 --pretty=%ae)"
- export COMMIT_INFO_AUTHOR="$(git log -1 --pretty=%an)"
- export COMMIT_INFO_SHA="$(git log -1 --pretty=%H)"
- export COMMIT_INFO_REMOTE="$(git config --get remote.origin.url)"
- echo $COMMIT_INFO_BRANCH
- echo $COMMIT_INFO_MESSAGE
- echo $COMMIT_INFO_EMAIL
- echo $COMMIT_INFO_AUTHOR
- echo $COMMIT_INFO_SHA
- echo $COMMIT_INFO_REMOTE
- echo $CODEBUILD_INITIATOR
- echo $CY_GROUP_SPEC
- CY_GROUP=$(echo $CY_GROUP_SPEC | cut -d'|' -f1)
- CY_BROWSER=$(echo $CY_GROUP_SPEC | cut -d'|' -f2)
- CY_SPEC=$(echo $CY_GROUP_SPEC | cut -d'|' -f3)
- CY_CONFIG=$(echo $CY_GROUP_SPEC | cut -d'|' -f4)
- echo $CY_GROUP
- echo $CY_BROWSER
- echo $CY_SPEC
- echo $CY_CONFIG
- yarn install --frozen-lockfile
pre_build:
commands:
- yarn types
- yarn lint
- yarn test:unit:ci
- yarn build:ci
build:
commands:
- yarn start:ci & npx wait-on http://localhost:3000
- npx cypress run --record --parallel --browser $CY_BROWSER --ci-build-id $CODEBUILD_INITIATOR --group "$CY_GROUP" --spec "$CY_SPEC" --config "$CY_CONFIG"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。