Skip to content
Snippets Groups Projects
Unverified Commit 7fb783a9 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Add end2end testing

parent bb9f31dd
No related branches found
No related tags found
No related merge requests found
Pipeline #17493 passed
...@@ -4,15 +4,22 @@ cache: ...@@ -4,15 +4,22 @@ cache:
key: ${CI_PROJECT_PATH} key: ${CI_PROJECT_PATH}
paths: paths:
- _yarn_cache - _yarn_cache
- _cypress_cache
before_script:
- yarn config set cache-folder "$CI_PROJECT_DIR/_yarn_cache"
- export CYPRESS_CACHE_FOLDER="$CI_PROJECT_DIR/_cypress_cache"
stages: stages:
- test - test
- deploy - deploy
- e2e-stage1
- e2e-stage2
- e2e-stage3
test: test:
stage: test stage: test
script: script:
- yarn config set cache-folder "$CI_PROJECT_DIR/_yarn_cache"
- yarn install - yarn install
- yarn run test - yarn run test
...@@ -20,7 +27,6 @@ linting: ...@@ -20,7 +27,6 @@ linting:
stage: test stage: test
allow_failure: true allow_failure: true
script: script:
- yarn config set cache-folder "$CI_PROJECT_DIR/_yarn_cache"
- yarn install - yarn install
- yarn run lint - yarn run lint
...@@ -35,7 +41,6 @@ publish: ...@@ -35,7 +41,6 @@ publish:
# NPM_TOKEN needs to be a "Publish" token with 2FA disabled! # NPM_TOKEN needs to be a "Publish" token with 2FA disabled!
# "Automation" tokens don't work with lerna (even if they would work with "npm publish") # "Automation" tokens don't work with lerna (even if they would work with "npm publish")
- echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > ~/.npmrc - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > ~/.npmrc
- yarn config set cache-folder "$CI_PROJECT_DIR/_yarn_cache"
- yarn install - yarn install
- yarn run build - yarn run build
- yarn run publish - yarn run publish
...@@ -81,3 +86,46 @@ deploy_development: ...@@ -81,3 +86,46 @@ deploy_development:
DEPLOY_KEY: "$DEPLOY_SSH_KEY" DEPLOY_KEY: "$DEPLOY_SSH_KEY"
<<: *deploy_defaults <<: *deploy_defaults
# For docker images see:
# https://github.com/cypress-io/cypress-docker-images/tree/master/browsers#cypressbrowsers
.e2e_test_defaults: &e2e_test_defaults
only:
refs:
- master
# We don't need artifacts from previous runs
dependencies: []
script:
- git clone https://gitlab.tugraz.at/dbp/middleware/e2e-tests.git --depth 1
- cd e2e-tests
- yarn install
# - ./node_modules/.bin/cypress run --browser "$BROWSER" --spec "cypress/integration/toolkit-showcase/*.spec.js"
- xvfb-run ./node_modules/.bin/cypress run --browser "$BROWSER" --headed --spec "cypress/integration/toolkit-showcase/*.spec.js"
artifacts:
paths:
- e2e-tests/cypress/videos/*
- e2e-tests/cypress/screenshots/*
expire_in: 4 week
when: always
ff75:
image: cypress/browsers:node13.8.0-chrome81-ff75
stage: e2e-stage1
variables:
MOZ_FORCE_DISABLE_E10S: 'true'
BROWSER: 'firefox'
<<: *e2e_test_defaults
chrome84:
image: cypress/browsers:node14.7.0-chrome84
stage: e2e-stage2
variables:
BROWSER: 'chrome'
<<: *e2e_test_defaults
edge88:
image: cypress/browsers:node14.10.1-edge88
stage: e2e-stage3
variables:
BROWSER: 'edge'
<<: *e2e_test_defaults
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment