-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Clean up unused files, imports, and work on getting end-to-end…
… tests and unit tests running (#2272)
- Loading branch information
Showing
374 changed files
with
14,205 additions
and
21,355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,11 +13,23 @@ version: 2.1 | |
## | ||
orbs: | ||
codecov: codecov/[email protected] | ||
cypress: cypress-io/[email protected] | ||
cypress: cypress-io/[email protected] | ||
executors: | ||
# Custom executor to override Cypress config | ||
deploy-to-prod-executor: | ||
docker: | ||
- image: 'cypress/browsers:node14.15.0-chrome86-ff82' | ||
environment: | ||
CYPRESS_BASE_URL: https://ohif-staging.netlify.com/ | ||
chrome-and-pacs: | ||
docker: | ||
# Primary container image where all steps run. | ||
- image: 'cypress/browsers:node14.15.0-chrome86-ff82' | ||
- image: 'ohif/viewer-testdata:0.1-test' | ||
|
||
defaults: &defaults | ||
docker: | ||
- image: circleci/node:12.9.1 | ||
- image: circleci/node:14.15.0 | ||
environment: | ||
TERM: xterm # Enable colors in term | ||
QUICK_BUILD: true | ||
|
@@ -170,7 +182,7 @@ jobs: | |
|
||
DEPLOY_TO_DEV: | ||
docker: | ||
- image: circleci/node:12.9.1 | ||
- image: circleci/node:14.15.0 | ||
environment: | ||
TERM: xterm | ||
NETLIFY_SITE_ID: 32708787-c9b0-4634-b50f-7ca41952da77 | ||
|
@@ -185,7 +197,7 @@ jobs: | |
|
||
DEPLOY_TO_STAGING: | ||
docker: | ||
- image: circleci/node:12.9.1 | ||
- image: circleci/node:14.15.0 | ||
environment: | ||
TERM: xterm | ||
NETLIFY_SITE_ID: c7502ae3-b150-493c-8422-05701e44a969 | ||
|
@@ -200,7 +212,7 @@ jobs: | |
|
||
DEPLOY_TO_PRODUCTION: | ||
docker: | ||
- image: circleci/node:12.9.1 | ||
- image: circleci/node:14.15.0 | ||
environment: | ||
TERM: xterm | ||
NETLIFY_SITE_ID: 79c4a5da-5c95-4dc9-84f7-45fd9dfe21b0 | ||
|
@@ -307,8 +319,73 @@ jobs: | |
workflows: | ||
version: 2 | ||
|
||
# WORKFLOWS Disabled until this feature branch is further along | ||
# See Master's CircleCI Config | ||
PR_CHECKS: | ||
jobs: | ||
- UNIT_TESTS: | ||
filters: | ||
branches: | ||
ignore: | ||
- master | ||
- feature/* | ||
- hotfix/* | ||
# E2E: PWA | ||
- cypress/run: | ||
name: 'E2E: PWA' | ||
executor: chrome-and-pacs | ||
browser: chrome | ||
pre-steps: | ||
- run: | | ||
# Clear yarn cache; update to latest | ||
rm -rf ~/.yarn | ||
npm i -g yarn | ||
yarn -v | ||
yarn: true | ||
record: true | ||
store_artifacts: true | ||
working_directory: platform/viewer | ||
build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build | ||
start: yarn run test:e2e:serve | ||
spec: 'cypress/integration/**/*' | ||
wait-on: 'http://localhost:3000' | ||
cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' | ||
no-workspace: true # Don't persist workspace | ||
post-steps: | ||
- store_artifacts: | ||
path: platform/viewer/cypress/screenshots | ||
- store_artifacts: | ||
path: platform/viewer/cypress/videos | ||
- store_test_results: | ||
path: platform/viewer/cypress/results | ||
requires: | ||
- UNIT_TESTS | ||
|
||
PR_OPTIONAL_VISUAL_TESTS: | ||
jobs: | ||
- AWAIT_APPROVAL: | ||
type: approval | ||
# Update hub.docker.org | ||
- cypress/run: | ||
name: 'Generate Percy Snapshots' | ||
executor: cypress/browsers-chrome76 | ||
browser: chrome | ||
pre-steps: | ||
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global | ||
add wait-on' # Use yarn latest | ||
yarn: true | ||
store_artifacts: false | ||
working_directory: platform/viewer | ||
build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build | ||
# start server --> verify running --> percy + chrome + cypress | ||
command: yarn run test:e2e:dist | ||
cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' | ||
no-workspace: true # Don't persist workspace | ||
post-steps: | ||
- store_artifacts: | ||
path: platform/viewer/cypress/screenshots | ||
- store_artifacts: | ||
path: platform/viewer/cypress/videos | ||
requires: | ||
- AWAIT_APPROVAL | ||
|
||
DEPLOY: | ||
jobs: | ||
|
@@ -319,3 +396,61 @@ workflows: | |
- DEPLOY_TO_DEV: | ||
requires: | ||
- BUILD | ||
- PROMOTE_TO_STAGING: | ||
type: approval | ||
requires: | ||
- DEPLOY_TO_DEV | ||
- DEPLOY_TO_STAGING: | ||
requires: | ||
- PROMOTE_TO_STAGING | ||
- PROMOTE_TO_PRODUCTION: | ||
type: approval | ||
requires: | ||
- DEPLOY_TO_STAGING | ||
- DEPLOY_TO_PRODUCTION: | ||
requires: | ||
- PROMOTE_TO_PRODUCTION | ||
### | ||
# Unit and E2E tests have already run for PR_CHECKS | ||
# Re-running should not gain us any confidence here | ||
### | ||
RELEASE: | ||
jobs: | ||
- NPM_PUBLISH: | ||
filters: | ||
branches: | ||
only: master | ||
- DOCS_PUBLISH: | ||
filters: | ||
branches: | ||
only: master | ||
# Update base branch snapshots | ||
# and record a Cypress dashboard test run | ||
- cypress/run: | ||
name: 'Generate Percy Snapshots' | ||
executor: cypress/browsers-chrome76 | ||
browser: chrome | ||
pre-steps: | ||
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global | ||
add wait-on' # Use yarn latest | ||
yarn: true | ||
store_artifacts: false | ||
working_directory: platform/viewer | ||
build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build | ||
# start server --> verify running --> percy + chrome + cypress | ||
command: yarn run test:e2e:dist | ||
cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' | ||
no-workspace: true # Don't persist workspace | ||
post-steps: | ||
- store_artifacts: | ||
path: platform/viewer/cypress/screenshots | ||
- store_artifacts: | ||
path: platform/viewer/cypress/videos | ||
- store_test_results: | ||
path: platform/viewer/cypress/results | ||
filters: | ||
branches: | ||
only: master | ||
- DOCKER_MASTER_PUBLISH: | ||
requires: | ||
- NPM_PUBLISH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.