Last active
November 28, 2020 19:30
-
-
Save andreybleme/41d5b357a34504437b90f98f28dbd34f to your computer and use it in GitHub Desktop.
andreybleme.com | Running Cypress tests in parallel at AWS Codepipeline CI, buildspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BuildSpec: | | |
version: 0.2 | |
phases: | |
install: | |
runtime-versions: | |
nodejs: 12 | |
commands: | |
- echo ">>> global installing dependencies" | |
- npm install -g typescript lerna | |
pre_build: | |
commands: | |
- echo ">>> Authenticating CI at Cypress Dashboard" | |
- export CYPRESS_SECRET_ACCESS_KEY=${CYPRESS_SECRET_ACCESS_KEY} | |
- export CYPRESS_ACCESS_KEY_ID=${CYPRESS_ACCESS_KEY_ID} | |
- echo ">>> Compiling typescript files" | |
- lerna bootstrap --hoist | |
- echo ">>> Installing frontend dependencies" | |
- cd frontend | |
- rm -fr node_modules && npm install | |
- npm install --save wait-on | |
- echo ">>> Starting frontend application" | |
- npm run serve & ./node_modules/.bin/wait-on http://localhost:8080 | |
- echo ">>> Running cypress tests" | |
- export BUILD_TAG=${CODEBUILD_SOURCE_VERSION} | |
- ./node_modules/.bin/cypress run --record --key=${CYPRESS_RECORD_KEY} --parallel --browser electron --group electron --ci-build-id $BUILD_TAG --headless --tag "nightly" | |
build: | |
commands: | |
- echo ">>> Nothing to do at BUILD phase" | |
post_build: | |
commands: | |
- echo ">>> Nothing to do at POST_BUILD phase" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment