Merge branch 'master' of github.com:mrvautin/expressCart
						commit
						59c7d1c8e4
					
				|  | @ -0,0 +1,29 @@ | |||
| name: Node CI | ||||
| 
 | ||||
| on: [push] | ||||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
| 
 | ||||
|     runs-on: ubuntu-latest | ||||
| 
 | ||||
|     strategy: | ||||
|       matrix: | ||||
|         node-version: [8.x, 10.x, 12.x] | ||||
| 
 | ||||
|     steps: | ||||
|     - uses: mrvautin/mongodb-action@v1 | ||||
|     - name: MongoDB | ||||
|       with: | ||||
|         mongo version: '3.4.10' | ||||
|     - uses: actions/checkout@v1 | ||||
|     - name: Use Node.js ${{ matrix.node-version }} | ||||
|       uses: actions/setup-node@v1 | ||||
|       with: | ||||
|         node-version: ${{ matrix.node-version }} | ||||
|     - name: npm install, build, and test | ||||
|       run: | | ||||
|         npm install | ||||
|         npm test | ||||
|       env: | ||||
|         CI: true | ||||
							
								
								
									
										15
									
								
								app.js
								
								
								
								
							
							
						
						
									
										15
									
								
								app.js
								
								
								
								
							|  | @ -31,26 +31,31 @@ if(baseConfig === false){ | |||
| } | ||||
| 
 | ||||
| // Validate the payment gateway config
 | ||||
| if(config.paymentGateway === 'paypal'){ | ||||
| switch(config.paymentGateway) | ||||
| { | ||||
|     case 'paypal': | ||||
|         const paypalConfig = ajv.validate(require('./config/paypalSchema'), require('./config/paypal.json')); | ||||
|         if(paypalConfig === false){ | ||||
|             console.log(colors.red(`PayPal config is incorrect: ${ajv.errorsText()}`)); | ||||
|             process.exit(2); | ||||
|         } | ||||
| } | ||||
| if(config.paymentGateway === 'stripe'){ | ||||
|         break; | ||||
| 
 | ||||
|     case 'stripe': | ||||
|         const stripeConfig = ajv.validate(require('./config/stripeSchema'), require('./config/stripe.json')); | ||||
|         if(stripeConfig === false){ | ||||
|             console.log(colors.red(`Stripe config is incorrect: ${ajv.errorsText()}`)); | ||||
|             process.exit(2); | ||||
|         } | ||||
| } | ||||
| if(config.paymentGateway === 'authorizenet'){ | ||||
|         break; | ||||
| 
 | ||||
|     case 'authorizenet': | ||||
|         const authorizenetConfig = ajv.validate(require('./config/authorizenetSchema'), require('./config/authorizenet.json')); | ||||
|         if(authorizenetConfig === false){ | ||||
|             console.log(colors.red(`Authorizenet config is incorrect: ${ajv.errorsText()}`)); | ||||
|             process.exit(2); | ||||
|         } | ||||
|         break; | ||||
| } | ||||
| 
 | ||||
| // require the routes
 | ||||
|  |  | |||
|  | @ -3387,10 +3387,13 @@ | |||
|       } | ||||
|     }, | ||||
|     "eslint-utils": { | ||||
|       "version": "1.3.1", | ||||
|       "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", | ||||
|       "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", | ||||
|       "dev": true | ||||
|       "version": "1.4.2", | ||||
|       "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz", | ||||
|       "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "eslint-visitor-keys": "^1.0.0" | ||||
|       } | ||||
|     }, | ||||
|     "eslint-visitor-keys": { | ||||
|       "version": "1.0.0", | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue