Skip to content

Instantly share code, notes, and snippets.

@andreybleme
Last active November 28, 2020 19:30
Show Gist options
  • Save andreybleme/41d5b357a34504437b90f98f28dbd34f to your computer and use it in GitHub Desktop.
Save andreybleme/41d5b357a34504437b90f98f28dbd34f to your computer and use it in GitHub Desktop.
andreybleme.com | Running Cypress tests in parallel at AWS Codepipeline CI, buildspec
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