Skip to content

Commit

Permalink
Merge pull request #4115 from Sage/cypress_docs
Browse files Browse the repository at this point in the history
chore(docker): remove X11 from cypress up - FE-4129
  • Loading branch information
Jamie Thompson authored Jun 1, 2021
2 parents 55da7b0 + 7ecf333 commit b75431f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cypress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Before starting please ensure you have the latest version of [docker](https://do

You will need to be able to access storybook, either from https://carbon.sage.com or from your local machine.
If you are using your local machine, please run `npm ci`. Once complete you can use `npm start` or if you have limited RAM
you can use `npm run build-storybook && npm run storybook:static` which will build the storybook and serve it without starting the storybook development server.
you can use `npm run build-storybook && npm run start:static` which will build the storybook and serve it without starting the storybook development server.

### Replicating GitHub Actions

Expand Down
7 changes: 5 additions & 2 deletions cypress/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ services:
- install
# Open Cypress and attach to a X11 server
# docker-compose --profile open up
# Unable to open X display? ensure you have added 127.0.0.1 to xhost allow list
# xhost +127.0.0.1
open:
image: "cypress/browsers:node14.16.0-chrome90-ff88"
environment:
Expand All @@ -23,21 +25,22 @@ services:
volumes:
- ../:/e2e
- cache:/root/.cache/Cypress/
- /tmp/.X11-unix:/tmp/.X11-unix
profiles:
- open
# Run Cypress tests using the Cypress dashboard
# CYPRESS_RECORD_KEY=FAKE-FAKE-FAKE-FAKE-FAKE BUILD_ID=$(uuidgen) docker-compose --profile run up
run:
deploy:
# Change this value to adjust the parallelisation
replicas: 3
image: "cypress/browsers:node14.16.0-chrome90-ff88"
environment:
- CYPRESS_baseUrl=http://host.docker.internal:9001/
- CYPRESS_RECORD_KEY=${CYPRESS_RECORD_KEY}
command: npx cypress run --record --parallel --browser chrome --ci-build-id ${BUILD_ID}
# Run specific Cypress test(s) using the Cypress dashboard
# command: npx cypress run --record --parallel --browser chrome --ci-build-id ${BUILD_ID} --spec cypress/features/regression/accessibility/accessibility*
working_dir: /e2e
network_mode: host
volumes:
- ../:/e2e
- cache:/root/.cache/Cypress/
Expand Down

0 comments on commit b75431f

Please sign in to comment.