From d9e59cfd73ea28f3d4218c2188554f4129669cfa Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 20 Jul 2018 19:57:16 +0100 Subject: [PATCH] CI settings (#524) * add test with coverage to travis * update circle-ci settings --- .circleci/config.yml | 2 +- .travis.yml | 9 ++++++++- package.json | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 309640f2d..4d4df0c45 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: key: alfresco-content-app-{{ .Branch }}-{{ checksum "package.json" }} paths: - "node_modules" - - run: xvfb-run -a npm run test:ci + - run: xvfb-run -a npm run test:pr lint: working_directory: ~/alfresco-content-app docker: diff --git a/.travis.yml b/.travis.yml index f97f4facd..83c3bf80a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,10 +15,17 @@ before_script: # Disable services enabled by default - sudo /etc/init.d/postgresql stop +before_install: + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + - sleep 3 # give xvfb some time to start + install: - npm install -g npm@latest - npm ci script: # - docker-compose stop - - npm run build && npm run e2e:docker + - npm run build + - npm run test:ci + - npm run e2e:docker diff --git a/package.json b/package.json index 264a7278c..7f89e0924 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "build:tomcat": "npm run server-versions && ng build --base-href ./", "build:electron": "npm run server-versions && ng build --output-path www --base-href ./", "test": "ng test --code-coverage", + "test:pr": "ng test --single-run --no-progress", "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", "server-versions": "rimraf ./src/versions.json && npm list --depth=0 --json=true --prod=true > ./src/versions.json || exit 0",