From 191c464b8782947fca6d352302ee82a964a57585 Mon Sep 17 00:00:00 2001 From: Huafu Gandon Date: Wed, 19 Sep 2018 18:11:09 +0200 Subject: [PATCH 1/2] ci(appveyor): try to improve appveyor's config --- appveyor.yml | 63 +++++++++++++++++++++------------------------------- 1 file changed, 25 insertions(+), 38 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a46e6fea16..cf06b2fed1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,60 +1,47 @@ # http://www.appveyor.com/docs/appveyor-yml -platform: - - x64 -init: -- ps: IF ($env:APPVEYOR_REPO_COMMIT_MESSAGE -Match "\[clean ci-cache\]" ) {$env:APPVEYOR_CACHE_SKIP_RESTORE = "true"} -- ps: IF ($env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED -Match "\[clean ci-cache\]") {$env:APPVEYOR_CACHE_SKIP_RESTORE = "true"} - -# Set build version format here instead of in the admin panel. -version: "{build}" - -# branches to build +version: '{build}' +pull_requests: + do_not_increment_build_number: true +skip_tags: true +shallow_clone: true +build: off +deploy: off +platform: x64 branches: - # blacklist except: - gh-pages -# Test against these versions of Node.js. -environment: - matrix: - - nodejs_version: "8" - -matrix: - fast_finish: true # set this flag to immediately finish build once one of the jobs fails. +# clear the cache if commit contains given text +init: +- ps: IF ($env:APPVEYOR_REPO_COMMIT_MESSAGE -Match "\[clean ci-cache\]" ) {$env:APPVEYOR_CACHE_SKIP_RESTORE = "true"} +- ps: IF ($env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED -Match "\[clean ci-cache\]") {$env:APPVEYOR_CACHE_SKIP_RESTORE = "true"} # Install scripts. (runs after repo cloning) install: - # Get the latest stable version of Node 0.STABLE.latest - - ps: Install-Product node $env:nodejs_version x64 + - ps: Install-Product node 8 x64 + - npm install -g npm@^5 # Typical npm stuff. - set CI=true # Our E2E work dir - set TS_JEST_E2E_WORKDIR=%APPDATA%\ts-jest-e2e - - npm install -g npm@^5 - npm ci --ignore-scripts - npm run clean -- --when-ci-commit-message cache: - - '%APPDATA%\npm-cache -> package.json' + - 'node_modules -> package.json' + - '%APPDATA%\npm-cache' - '%APPDATA%\ts-jest-e2e\__templates__' # Post-install test scripts. test_script: - cmd: npm run test -# Don't actually build. -build: off - -# Uses GitHub API to download the repo without git history -# @see: https://www.appveyor.com/docs/how-to/repository-shallow-clone/#downloading-repository-via-github-or-bitbucket-api -shallow_clone: true - -skip_commits: - files: - - 'docs/**/*' - - '**/*.md' - - .gitignore - - .gitattributes - - .travis.yml - - icon.png - - commitlint.config.js +# skip_commits: +# files: +# - 'docs/**/*' +# - '**/*.md' +# - .gitignore +# - .gitattributes +# - .travis.yml +# - icon.png +# - commitlint.config.js From 76e2fe5eb9d00817b52097544e77657b0c01bd27 Mon Sep 17 00:00:00 2001 From: Huafu Gandon Date: Wed, 19 Sep 2018 18:29:56 +0200 Subject: [PATCH 2/2] ci(appveyor): cache npm versions as well --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index cf06b2fed1..5025042b76 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,6 +30,7 @@ install: cache: - 'node_modules -> package.json' - '%APPDATA%\npm-cache' + - '%APPDATA%\npm' - '%APPDATA%\ts-jest-e2e\__templates__' # Post-install test scripts.