From d00a3caece23319aded1a1e6cafc4412c5cfc07b Mon Sep 17 00:00:00 2001 From: Nawaz Dhandala Date: Fri, 2 Aug 2019 21:47:19 +0530 Subject: [PATCH] Add lint and build for all projects. --- .gitlab-ci.yml | 78 ++++++++++++++++++++++++++++++++++++++++++ dashboard/package.json | 3 +- 2 files changed, 79 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d79aab5dd..c6b73314d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,7 @@ stages: - Deploy_Staging - Deploy_Production +##BACKEND lint_n_audit_backend: stage: Build_n_Test script: @@ -18,6 +19,7 @@ lint_n_audit_backend: - npm install --dev - npm run lint # - npm run audit + - cd .. build_n_test_backend: stage: Build_n_Test @@ -28,6 +30,82 @@ build_n_test_backend: - sudo docker build -t fyipe-project/backend:3.0.$CI_PIPELINE_IID ./backend - sudo docker run --name fyipe --network container:mongo fyipe-project/backend:3.0.$CI_PIPELINE_IID npm test +##DASHBOARD +lint_n_audit_dashboard: + stage: Build_n_Test + script: + - cd dashboard + - npm install --dev + - npm run lint + # - npm run audit + - cd .. + +build_n_test_dashboard: + stage: Build_n_Test + script: + - echo "No test implemented" + +## STATUS PAGE +lint_n_audit_statuspage: + stage: Build_n_Test + script: + - cd status-page + - npm install --dev + - npm run lint + - npm run audit + - cd .. + +build_n_test_statuspage: + stage: Build_n_Test + script: + - echo "No test implemented" + +## ACCOUNTS +lint_n_audit_accounts: + stage: Build_n_Test + script: + - cd accounts + - npm install --dev + - npm run lint + - npm run audit + - cd .. + +build_n_test_accounts: + stage: Build_n_Test + script: + - echo "No test implemented" + +## HOME +lint_n_audit_home: + stage: Build_n_Test + script: + - cd home + - npm install --dev + - npm run lint + - npm run audit + - cd .. + +build_n_test_home: + stage: Build_n_Test + script: + - echo "No test implemented" + +## PROBE +lint_n_audit_probe: + stage: Build_n_Test + script: + - cd probe + - npm install --dev + - npm run lint + - npm run audit + - cd .. + +build_n_test_probe: + stage: Build_n_Test + script: + - echo "No test implemented" + +##E2E Stage. e2e_test: stage: E2E_test script: diff --git a/dashboard/package.json b/dashboard/package.json index e3ff5d087b..78b27587b1 100755 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -70,8 +70,7 @@ "lint": "eslint .", "dev": "PORT=3000 react-scripts start", "build": "react-scripts build", - "jest": "jest --clearCache && jest", - "test": "npm run lint", + "test": "jest --clearCache && jest", "start": "node index.js", "audit": "npm-audit-ci-wrapper --threshold=high" },