forked from PrairieLearn/PrairieLearn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
27 lines (27 loc) · 1.14 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
25
26
27
sudo: required
services:
- docker
branches:
only:
- master
- /^[0-9]+\.[0-9]+$/
- code-coverage
notifications:
slack:
secure: DzxZ8DNGFANLnls0j0/hiKjwg6aO/gI3UO8SiRKjqCO/x27uvBCJiDkTqCx834XVzuDBp6LIdHbyUuwRFyaVHyFYTbA0pqE4fe4/DxkK5DuRDj89cw8JgoK7/g9m/J9Y6GvwaOaE4SW0tnHeTwNDVCt7/w8rn1kxDo/tWtS+3cg=
before_install:
- docker build -t pltest .
script:
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then sh ./tools/verify-changelog.sh; fi'
- docker run -itd --name=npm_test_container pltest /bin/bash
- docker exec -it npm_test_container /PrairieLearn/docker/lint_js.sh
- docker exec -it npm_test_container /PrairieLearn/docker/lint_python.sh
- docker exec -it npm_test_container /PrairieLearn/docker/npm_test.sh
after_success:
- >
docker exec
-e TRAVIS=$TRAVIS -e TRAVIS_JOB_ID=$TRAVIS_JOB_ID -e TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST -e TRAVIS_BRANCH=$TRAVIS_BRANCH
-it npm_test_container
/PrairieLearn/docker/coveralls.sh
# https://docs.travis-ci.com/user/coveralls/#Using-Coveralls-with-Docker-builds
# https://github.com/nickmerwin/node-coveralls/blob/b9032a18bd8d7fba7eaa0924a77e810ec4d0935a/lib/getOptions.js#L20