Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

Commit 96f7690

Browse files
committed
[Tests] add travis.yml
1 parent dd9a6a9 commit 96f7690

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

.travis.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
language: node_js
2+
os:
3+
- linux
4+
node_js:
5+
- "10"
6+
- "8"
7+
- "6"
8+
before_install:
9+
- 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac'
10+
- 'nvm install-latest-npm'
11+
install:
12+
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
13+
script:
14+
- 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
15+
- 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
16+
- 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
17+
sudo: false
18+
env:
19+
- TEST=true
20+
matrix:
21+
fast_finish: true
22+
include:
23+
- node_js: "lts/*"
24+
env: PRETEST=true
25+
allow_failures:
26+
- os: osx
27+
- env: TEST=true ALLOW_FAILURE=true

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"lint": "eslint --ext=js,jsx src",
1616
"prepublish": "npm run build",
1717
"pretest": "npm run lint",
18-
"test": "jest --coverage"
18+
"tests-only": "jest --coverage",
19+
"test": "npm run tests-only"
1920
},
2021
"author": "Jordan Harband <ljharb@gmail.com>",
2122
"license": "MIT",

0 commit comments

Comments
 (0)