Skip to content

Commit

Permalink
Merge pull request #734 from huafu/appveyor-optimizations
Browse files Browse the repository at this point in the history
improves AppVeyor's config a bit
  • Loading branch information
huafu committed Sep 19, 2018
2 parents 0f31b42 + 45d44d1 commit 3665609
Showing 1 changed file with 26 additions and 38 deletions.
64 changes: 26 additions & 38 deletions appveyor.yml
@@ -1,60 +1,48 @@
# 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%\npm'
- '%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

0 comments on commit 3665609

Please sign in to comment.