From 8f3ccc7b38c5d06f467f869acdc368135890dc1c Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Thu, 5 Apr 2018 21:39:59 +0100 Subject: [PATCH] [ACA-1283] CircleCI settings (#287) --- .circleci/config.yml | 16 ++++++++++++++++ package.json | 1 + 2 files changed, 17 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..bef30d031 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,16 @@ +version: 2 +jobs: + build: + working_directory: ~/alfresco-content-app + docker: + - image: circleci/node:8-browsers + steps: + - checkout + - restore_cache: + key: alfresco-content-app-{{ .Branch }}-{{ checksum "package.json" }} + - run: npm install + - save_cache: + key: alfresco-content-app-{{ .Branch }}-{{ checksum "package.json" }} + paths: + - "node_modules" + - run: xvfb-run -a npm run test:ci diff --git a/package.json b/package.json index 1fd2b5403..4ea096e66 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "build:dev": "npm run server-versions && ng build && node postbuild-dev.js", "build:tomcat": "npm run server-versions && ng build --base-href ./", "test": "ng test --code-coverage", + "test:ci": "ng test --code-coverage --single-run --no-progress && cat ./coverage/lcov.info | ./node_modules/.bin/codacy-coverage && rm -rf ./coverage", "lint": "ng lint", "e2e": "ng e2e", "server-versions": "rimraf ./src/versions.json && npm list --depth=0 --json=true --prod=true > ./src/versions.json || exit 0"