forked from streetmix/streetmix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
50 lines (40 loc) · 1.79 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
language: node_js
node_js:
- "8"
# Turns on newer container-based infrastructure
# This generates a sudo warning with mongodb below, see here: https://github.com/travis-ci/travis-ci/issues/3044
sudo: false
env:
global:
- NODE_ENV: test
- secure: entbiF59zjgSiel6S8bsKUrZVCXKsun9OqO95ABoQ8EaLrnP536EGVN/LurT/9W1QXcxLVChTpYZRizrhIoEQPi4vOVLrA5yhWlTGQULXWGNMf0VDTKfXOSQ6pV45zPnlmK/UV4eWAtDa7KsfOlPvQeX1K1JqSijLhPANNykGAQ=
- secure: YFYR9PLyfwpVVRoTeCz/0Cml2NDCrqUgufshdKxc5SM/l0Ix8XlP8eJ+s3CVArTzWJg9nzOopt9qaXtTbcN+Kr5SaMDpmjliXpmOGEkhx29dCTYuksjbGW44ImUWT2kaAARZnufPXrI7/QDxHjcaMWlR5wKveB/8m0FpEpd7YL4=
addons:
sauce_connect: true
services:
- mongodb
before_script:
# Artificial wait before connecting to MongoDB
# https://docs.travis-ci.com/user/database-setup/#MongoDB-does-not-immediately-accept-connections
- sleep 15
# Start the server and run it in background process
- node index &
script:
# Note: don't run `npm test` here directly, it's intended for local testing.
- npm run jest
- npm run lint
# Sauce-based tests cannot be performed on pull request open by user that
# doesn't have write permission to main repository
# https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
- 'if [ "$SAUCE_USERNAME" ] && [ "$SAUCE_ACCESS_KEY" ]; then protractor ./test/integration/saucelabs.conf.js; fi'
# Send exit signal to node process
after_script:
- pkill node
notifications:
webhooks: http://project-monitor.codeforamerica.org/projects/4083b10b-11a4-4ac5-9a7f-51c5cb614243/status
cache:
directories:
- node_modules
notifications:
slack:
secure: cqfsAO9mXGrdUl+f558aOlM1Z46UkvVU7dB5TvnXPUq7oim1NowQqCbSayCLtE2qayz+cVW1Qtid5znUygMOHgr3pWOJqnIN2Bjc6M2X+dLlnL6KAj+PS6uPHmlhwsArIdpDxkO1auVKODZAJbBuBhaFNhQphIzBbW4Cqc2Zn5w=