Commit d6cab552 authored by Mark Harding's avatar Mark Harding

(feat): some changes to the ci flow, test against chrome and base image

parent 14da30ea
No related merge requests found
Pipeline #74394320 canceled with stages
in 4 minutes and 21 seconds
......@@ -13,11 +13,10 @@ stages:
- deploy:canary
- deploy:production
cache:
key: $CI_BUILD_REF_SLUG
paths:
- node_modules
policy: pull
variables:
CYPRESS_INSTALL_BINARY: 0 # Speeds up the install process
npm_config_cache: "$CI_PROJECT_DIR/.npm"
CYPRESS_CACHE_FOLDER: "$CI_PROJECT_DIR/cache/Cypress"
variables:
CYPRESS_INSTALL_BINARY: 0 # Speeds up the install process
......@@ -26,13 +25,62 @@ test:
image: circleci/node:8-browsers
stage: test:unit
script:
- npm install # Should be cached...
- npm ci
- npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
e2e:base:
image: cypress/base:10
stage: test:e2e
variables:
CYPRESS_INSTALL_BINARY: 1
script:
- npm ci
- >
if [ "$CI_BUILD_REF_NAME" == "master" ]; then
export E2E_DOMAIN=https://www.minds.com
else
export E2E_DOMAIN=https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
fi
- export CYPRESS_baseUrl=$E2E_DOMAIN
- echo "E2E tests for $CI_BUILD_REF_NAME running against $E2E_DOMAIN with user $CYPRESS_username"
- $(npm bin)/cypress run --record --key $CYPRESS_RECORD_ID --config CYPRESS_baseUrl=$E2E_DOMAIN
artifacts:
when: always
paths:
- cypress/screenshots/**/*.mp4
- cypress/videos/**/*.mp4
cache:
paths:
- .npm
- cache/Cypress
allow_failure: true #manual inspection in case of timeouts
e2e:chrome:
image: cypress/browsers:chrome67
stage: test:e2e
variables:
CYPRESS_INSTALL_BINARY: 1
script:
- npm ci
- >
if [ "$CI_BUILD_REF_NAME" == "master" ]; then
export E2E_DOMAIN=https://www.minds.com
else
export E2E_DOMAIN=https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
fi
- export CYPRESS_baseUrl=$E2E_DOMAIN
- echo "E2E tests for $CI_BUILD_REF_NAME running against $E2E_DOMAIN with user $CYPRESS_username"
- $(npm bin)/cypress run --browser chrome --record --key $CYPRESS_RECORD_ID --config CYPRESS_baseUrl=$E2E_DOMAIN
artifacts:
when: always
paths:
- cypress/screenshots/**/*.mp4
- cypress/videos/**/*.mp4
cache:
key: $CI_BUILD_REF_SLUG
paths:
- node_modules
policy: pull-push
- .npm
- cache/Cypress
allow_failure: true #manual inspection in case of timeouts
e2e:
image: cypress/browsers:chrome67
......@@ -54,18 +102,20 @@ e2e:
artifacts:
when: always
paths:
- cypress/screenshots
- cypress/videos
- cypress/screenshots/**/*.mp4
- cypress/videos/**/*.mp4
cache:
paths:
- .npm
- cache/Cypress
allow_failure: true #manual inspection in case of timeouts
build:review:
stage: build
script:
- npm install # TODO: Why is this needed?
- npm ci && npm install -g gulp-cli
- npm run postinstall
- npm install -g gulp-cli
- npm rebuild node-sass
- gulp build.sass && gulp build.sass ##weird build needs to be run twice for now
- sh build/base-locale.sh dist
artifacts:
......@@ -80,10 +130,8 @@ build:review:
build:production:en:
stage: build
script:
- npm install # TODO: Why is this needed?
- npm ci && npm install -g gulp-cli
- npm run postinstall
- npm install -g gulp-cli
- npm rebuild node-sass
- gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en && gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en ##weird build needs to be run twice for now
- sh build/base-locale.sh dist https://cdn-assets.minds.com/front/dist
artifacts:
......@@ -98,10 +146,8 @@ build:production:en:
build:production:i18n:
stage: build
script:
- npm install # TODO: Why is this needed?
- npm ci && npm install -g gulp-cli
- npm run postinstall
- npm install -g gulp-cli
- npm rebuild node-sass
- gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en && gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en ##weird build needs to be run twice for now
- sh build/i18n-locales-all.sh dist https://cdn-assets.minds.com/front/dist
artifacts:
......
This diff is collapsed.
......@@ -57,7 +57,7 @@
"@types/jasminewd2": "~2.0.4",
"@types/node": "~10.12.18",
"codelyzer": "^4.5.0",
"cypress": "^3.2.0",
"cypress": "^3.4.1",
"gulp": "~4.0.0",
"gulp-autoprefixer": "^6.0.0",
"gulp-css-globbing": "^0.2.2",
......
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