Commit c64e5a60 authored by Miroslav Vranka's avatar Miroslav Vranka
Browse files

sorry cypress urls configuration

parent ae23ac86
Pipeline #12870 canceled with stages
in 25 minutes and 23 seconds
# first, install Cypress, then run all tests (in parallel) # first, install Cypress, then run all tests (in parallel)
stages: stages:
- build - build
- install
- test - test
# to cache both npm modules and Cypress binary we use environment variables # to cache both npm modules and Cypress binary we use environment variables
...@@ -18,6 +19,20 @@ cache: ...@@ -18,6 +19,20 @@ cache:
- cache/Cypress - cache/Cypress
- node_modules - node_modules
#services:
# - docker:dind
#
#before_script:
# - docker info
# - docker-compose --version
build image:
image: tmaier/docker-compose:latest
stage: build
script:
- docker info
- docker-compose --version
- docker-compose -f docker-compose.full.yml up
# this job installs NPM dependencies and Cypress # this job installs NPM dependencies and Cypress
install: install:
image: cypress/browsers:node14.15.0-chrome86-ff82 image: cypress/browsers:node14.15.0-chrome86-ff82
...@@ -40,7 +55,7 @@ install: ...@@ -40,7 +55,7 @@ install:
script: script:
- npm ci - npm ci
# run Cypress test in load balancing mode # run Cypress test in load balancing mode
- cypress run --browser chrome --headless --record --key cypress_demo --parallel --ci-build-id $CI_CONCURRENT_ID - npx cypress run --browser chrome --headless --config viewportWidth=375,viewportHeight=667 --record --key cypress_demo --parallel --ci-build-id $CI_CONCURRENT_ID
- npx nyc report --reporter=text-summary - npx nyc report --reporter=text-summary
artifacts: artifacts:
when: always when: always
...@@ -55,7 +70,7 @@ install: ...@@ -55,7 +70,7 @@ install:
script: script:
- npm i - npm i
# run Cypress test in load balancing mode # run Cypress test in load balancing mode
- npm run test:ci:mobile - npx cypress run --browser chrome --headless --record --key cypress_demo --parallel --ci-build-id $CI_CONCURRENT_ID
- npx nyc report --reporter=text-summary - npx nyc report --reporter=text-summary
artifacts: artifacts:
when: always when: always
...@@ -70,7 +85,7 @@ install: ...@@ -70,7 +85,7 @@ install:
script: script:
- npm i - npm i
# run Cypress test in load balancing mode # run Cypress test in load balancing mode
- npm run test:ci:firefox - npx cypress run --browser firefox --headless --record --key cypress_demo --parallel --ci-build-id $CI_CONCURRENT_ID
- npx nyc report --reporter=text-summary - npx nyc report --reporter=text-summary
artifacts: artifacts:
when: always when: always
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"$schema": "https://on.cypress.io/cypress.schema.json", "$schema": "https://on.cypress.io/cypress.schema.json",
"video": true, "video": true,
"screenshots": true, "screenshots": true,
"videoCompression": 1, "videoCompression": 0,
"fixturesFolder": "cypress/fixtures", "fixturesFolder": "cypress/fixtures",
"integrationFolder": "cypress/tests", "integrationFolder": "cypress/tests",
"pluginsFile": "cypress/plugins/index.js", "pluginsFile": "cypress/plugins/index.js",
......
...@@ -7,14 +7,15 @@ services: ...@@ -7,14 +7,15 @@ services:
director: director:
image: agoldis/sorry-cypress-director:latest image: agoldis/sorry-cypress-director:latest
environment: environment:
DASHBOARD_URL: cypress-inventi-dashboard.herokuapp.com/ DASHBOARD_URL: 'http://cypress-inventi-dashboard.herokuapp.com'
MONGODB_URI: 'mongodb://mongo:27017' MONGODB_URI: ${MONGO_URI}
MONGODB_DATABASE: 'cypress-db' MONGODB_DATABASE: 'cypress-db'
EXECUTION_DRIVER: '../execution/mongo/driver' EXECUTION_DRIVER: '../execution/mongo/driver'
SCREENSHOTS_DRIVER: '../screenshots/s3.driver' SCREENSHOTS_DRIVER: '../screenshots/s3.driver'
AWS_ACCESS_KEY_ID: 'key' AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: 'secret' AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
S3_BUCKET: cypress-inventi-dashboard S3_REGION: "us-east-2"
S3_BUCKET: 'cy-sorry-dashboard'
ports: ports:
- 1234:1234 - 1234:1234
depends_on: depends_on:
...@@ -23,7 +24,7 @@ services: ...@@ -23,7 +24,7 @@ services:
api: api:
image: agoldis/sorry-cypress-api:latest image: agoldis/sorry-cypress-api:latest
environment: environment:
MONGODB_URI: 'mongodb://mongo:27017' MONGODB_URI: ${MONGO_URI}
MONGODB_DATABASE: 'sorry-cypress' MONGODB_DATABASE: 'sorry-cypress'
ports: ports:
- 4000:4000 - 4000:4000
...@@ -33,7 +34,9 @@ services: ...@@ -33,7 +34,9 @@ services:
dashboard: dashboard:
image: agoldis/sorry-cypress-dashboard:latest image: agoldis/sorry-cypress-dashboard:latest
environment: environment:
GRAPHQL_SCHEMA_URL: http://localhost:4000 GRAPHQL_SCHEMA_URL: 'http://cypress-inventi-api.herokuapp.com'
CI_URL: ''
PORT: 8080
ports: ports:
- 8080:8080 - 8080:8080
depends_on: depends_on:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment