From d9d308d6a78f14cdb7afe8624be9daf4e2370401 Mon Sep 17 00:00:00 2001 From: Evilebot Tnawi Date: Tue, 19 Feb 2019 14:19:21 +0300 Subject: [PATCH] ci: small improve (#1669) --- .travis.yml | 42 ++++++++++++++++++++++++++---------------- appveyor.yml | 16 ++++++++++++---- 2 files changed, 38 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 96e991c1be..2134c2ffe4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,27 @@ +sudo: false + +git: + depth: 10 + +branches: + only: + - master + - next + - language: node_js cache: directories: - node_modules + - $HOME/.npm -jobs: +matrix: fast_finish: true include: - - stage: Lint - env: SCRIPT=lint - node_js: 'stable' + - env: JOB_PART=lint + node_js: 11 - &linux - stage: Test (Linux) - env: SCRIPT=test - node_js: 'stable' - - <<: *linux + env: JOB_PART=test node_js: 11 - <<: *linux node_js: 10 @@ -23,9 +30,8 @@ jobs: - <<: *linux node_js: 6 - &osx - stage: Test (MacOS) os: 'osx' - env: SCRIPT=test + env: JOB_PART=test node_js: 11 - <<: *osx node_js: 10 @@ -34,15 +40,19 @@ jobs: - <<: *osx node_js: 6 -install: +before_install: - npm i -g npm@latest - - npm i -script: npm run $SCRIPT +install: + - npm ci + +before_script: + - node --version + - npm --version + +script: + - npm run $SCRIPT after_success: - npm i codecov - $(npm bin)/codecov - -notifications: - email: false diff --git a/appveyor.yml b/appveyor.yml index 080547f849..9223004f99 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,11 +1,17 @@ build: 'off' -cache: - - node_modules +branches: + only: + - master + - next init: - git config --global core.autocrlf input +cache: + - node_modules + - '%APPDATA%\npm-cache' + environment: matrix: - nodejs_version: '11' @@ -23,10 +29,12 @@ matrix: install: - ps: Install-Product node $env:nodejs_version x64 - npm i -g npm@latest - - npm i + - npm ci before_test: - cmd: npm i webpack@%webpack_version% test_script: - - cmd: npm t + - node --version + - npm --version + - cmd: npm test