---
# System prepended metadata

title: OHIF
tags: [ohif]

---

---
tags: ohif
---

# OHIF 


->PR->ci

用到的外在環境:[circleCI] [netlify] [codecov] [cypress]
免費方案限制:
-    circleCI 
-    netlify 
-    codecov 
-    cypress

### git flow:
-
    Triangular Workflow
![image alt](https://github.blog/wp-content/uploads/2015/07/5dcdcae4-354a-11e5-9f82-915914fad4f7.png?resize=2000%2C951)
建立多個工作區
好處:
worktree 可以讓你直接開一個獨立的工作區域切換出去做別的事，未 commit 的檔案原封不動留在原來的 repo。
### workflow
![image alt](https://live.staticflickr.com/4588/38293694275_af42b37897_o.png)
1. PR_CHECKS(npm script)
PR前要先通過所有unit e2e測試
2.PR_OPTIONAL_DOCKER_PUBLISH
    

config:
-
    [git]
        commit:
            
    [code style]
        prettier:
        es lint:
    [bundle]
        babel:
        webpack:
    [container]
        dockerfile:
             1. Building App
             2. Set up Nginx (proxy)
    [CI]
        circleCI:     
        	orbs: codecov cypress
        	image: circleci/node:12.9.1
            
        netlify:
        
        test:
            unit:jest
            e2e:cypress
            coverage:codecov
            
        
        
    

bash script:
-
    

container:
-
    dockerfile:
     1. Building App
     2. Set up Nginx (proxy)

 

 code style:
 -
     prettier
     es lint
 
 dev tool:
 -
     babel
     webpack
     
test:
-
    unit test:jest
    e2e test: cypress
    Coverage : codecov 
CI:
-
    circleCI     
        orbs: codecov cypress
        image: circleci/node:12.9.1
    netlify
    
npm script:
-
     package cmd
     env
     
---   

PR_CHECKS
-
    unit test:
            steps: 
            1.Update yarn
            2.Restore Yarn and Cypress Package Cache
            3.Install Dependencies
            4.Save Yarn Package Cache
            5.run test

    
PR_OPTIONAL_DOCKER_PUBLISH
-
    unit test:
            steps: 

DEPLOY
-
    unit test:
            steps: 

         
         