Skip to content

Commit

Permalink
Merge 0329232 into e70d11c
Browse files Browse the repository at this point in the history
  • Loading branch information
huafu committed Sep 9, 2018
2 parents e70d11c + 0329232 commit 2275b9d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 13 deletions.
23 changes: 19 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,34 @@ node_js:
- "8"
- "6"

sudo: false

before_install:
# https://github.com/scikit-learn/scikit-learn/issues/10927
- |
set -e
# fail loudly when force-pushed
MODIFIED_FILES=$(git diff --name-only $TRAVIS_COMMIT_RANGE)
# fail loudly when force-pushed, that is why there is the `|| 'dummy.js'` part
MODIFIED_FILES=$(git diff --name-only $TRAVIS_COMMIT_RANGE || echo 'dummy.js')
# waiting for native solution https://github.com/travis-ci/travis-ci/issues/6301
if ! echo ${MODIFIED_FILES} | grep -qvE '(\.md$)|(^docs)/'; then
if ! echo ${MODIFIED_FILES} | grep -qvE '^docs/|^\.gitignore|^\.gitattributes|\.md$|^appveyor\.yml$|^icon.png$|^commitlint\.config\.js$'; then
echo "Only docs were updated, stopping build process."
exit
fi
# ensure we have npm >= 5.8 so that we can use `npm ci` instead of `npm install` (much faster)
- dpkg --compare-versions `npm -v` ge 5.8 || npm i -g npm@latest
# we report coverages only within node 10, ensure we have the coveralls bin installed
- 'if [[ "$(node --version)" == v10.* ]]; then npm install --global coveralls; fi'

script:
- npm run clean -- --when-ci-commit-message
- npm run test -- --coverage
# only grab coverage data on node 10
- |
if [[ "$(node --version)" == v10.* ]]; then
npm run test -- --coverage;
else
npm run test;
fi
after_success:
# report coverages to coveralls
- 'if [[ "$(node --version)" == v10.* && -s coverage/lcov.info ]]; then cat coverage/lcov.info | coveralls; fi'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ts-jest [![npm version](https://badge.fury.io/js/ts-jest.svg)](https://badge.fury.io/js/ts-jest) [![NPM downloads](https://img.shields.io/npm/dm/ts-jest.svg?style=flat)](https://npmjs.org/package/ts-jest) [![Known Vulnerabilities](https://snyk.io/test/github/kulshekhar/ts-jest/badge.svg)](https://snyk.io/test/github/kulshekhar/ts-jest) [![Build Status for linux](https://travis-ci.org/kulshekhar/ts-jest.svg?branch=master)](https://travis-ci.org/kulshekhar/ts-jest) [![Build Status for Windows](https://ci.appveyor.com/api/projects/status/g8tt9qd7usv0tolb/branch/master?svg=true)](https://ci.appveyor.com/project/kulshekhar/ts-jest/branch/master)
# ts-jest [![npm version](https://badge.fury.io/js/ts-jest.svg)](https://badge.fury.io/js/ts-jest) [![NPM downloads](https://img.shields.io/npm/dm/ts-jest.svg?style=flat)](https://npmjs.org/package/ts-jest) [![Known Vulnerabilities](https://snyk.io/test/github/kulshekhar/ts-jest/badge.svg)](https://snyk.io/test/github/kulshekhar/ts-jest) [![Coverage Status](https://coveralls.io/repos/github/kulshekhar/ts-jest/badge.svg?branch=master)](https://coveralls.io/github/kulshekhar/ts-jest?branch=master) [![Build Status for linux](https://travis-ci.org/kulshekhar/ts-jest.svg?branch=master)](https://travis-ci.org/kulshekhar/ts-jest) [![Build Status for Windows](https://ci.appveyor.com/api/projects/status/g8tt9qd7usv0tolb/branch/master?svg=true)](https://ci.appveyor.com/project/kulshekhar/ts-jest/branch/master)

<img src="./icon.png" align="right"
title="TSJest Logo by Huafu Gandon" width="128" height="128">
Expand Down
30 changes: 22 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
# 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
branches:
# blacklist
except:
- gh-pages

# Test against these versions of Node.js.
environment:
matrix:
- nodejs_version: "10"
- nodejs_version: "8"
- nodejs_version: "6"

matrix:
fast_finish: true # set this flag to immediately finish build once one of the jobs fails.

# Install scripts. (runs after repo cloning)
install:
- git rev-parse HEAD
# Get the latest stable version of Node 0.STABLE.latest
- ps: Install-Product node $env:nodejs_version
- ps: Install-Product node $env:nodejs_version x64
# Typical npm stuff.
- set CI=true
# Our E2E work dir
- set TS_JEST_E2E_WORKDIR=%APPDATA%\ts-jest-e2e
- npm -g install npm@latest
- npm ci || npm install
- npm install -g npm@^5
- npm ci --ignore-scripts
- npm run clean -- --when-ci-commit-message

cache:
Expand All @@ -28,13 +41,14 @@ cache:

# Post-install test scripts.
test_script:
- cmd: npm run test -- --coverage
- cmd: npm run test

# Don't actually build.
build: off

# Set build version format here instead of in the admin panel.
version: "{build}"
# 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:
Expand Down

0 comments on commit 2275b9d

Please sign in to comment.