forked from report-ci/js-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
24 lines (19 loc) · 1.03 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
language: node_js
sudo: false
node_js:
- "node"
env:
- FRAMEWORK=ava CMD="ava tests/ava.js -t" OUTFILE=ava.tap INSTALL=ava ANNOTATE_LOG=false
- FRAMEWORK=mocha CMD="mocha tests/chai.js tests/unit-js.js -R json" OUTFILE=mocha.json INSTALL="mocha chai unit.js" ANNOTATE_LOG=true
- FRAMEWORK=qunit CMD="qunit tests/qunit-tests.js" OUTFILE=qunit.tap INSTALL=qunit ANNOTATE_LOG=false
- FRAMEWORK=tape CMD="tape tests/tape.js" OUTFILE=tape.tap INSTALL=tape ANNOTATE_LOG=true
install:
- npm install $INSTALL
- set -o pipefail
script:
- $CMD 2> build.log | tee $OUTFILE
- cat build.log
after_failure:
- if [ "$ANNOTATE_LOG" != false ]; then curl -s https://raw.githubusercontent.com/report-ci/scripts/master/annotate.py | python - --tool node --input build.log --name $FRAMEWORK ; fi
after_script:
- curl -s https://raw.githubusercontent.com/report-ci/scripts/master/upload.py | python - --framework=$FRAMEWORK