forked from mozilla-services/FindMyDevice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (55 loc) · 1.64 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
51
52
53
54
55
56
57
58
59
60
61
62
language:
# go for the server
- go
# node for the front-end + tests
- node_js
go:
# Minimum supported version of go
- 1.3
node_js:
# Minimum supported version of node
- 0.10.0
addons:
# Minimum supported version of PostgreSQL
postgresql: "9.3"
# Always use the latest version of Firefox
firefox: "31.0"
before_install:
# Download Selenium
- wget http://selenium-release.storage.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar
# DIE SPINNER DIE
- npm config set spin false
# Download Bower and npm dependencies from the Freight server
- export FREIGHT_URL=https://freight.dev.lcip.org
- cd static && npm install -g vladikoff/freight#v0.4.0 && freight && cd ..
# Install grunt globally
- npm install -g grunt-cli
install:
# Install go dependencies and npm install
- ./install.bash
before_script:
# Copy configuration
- cp config-travis.ini config.ini
# Setup database
- psql -c 'create database fmd;' -U postgres
- psql -c "CREATE USER fmd WITH PASSWORD 'fmd';" -U postgres
- psql -c 'GRANT ALL PRIVILEGES ON DATABASE fmd to fmd;' -U postgres
- psql -c 'ALTER SCHEMA public OWNER to fmd;' -U postgres
- psql -U fmd fmd < sql/create_db.sql
# Configure and start xvfb
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
# Start selenium and ignore the output
- java -jar selenium-server-standalone-2.41.0.jar &> /dev/null &
# Start go server
- ./runserver.bash &
# Start phony
- node static/test/phony.js &
# Let the servers settle
- sleep 5
# All the script action happens in static
- cd static
script:
- grunt validate-shrinkwrap --force
- npm run outdated
- npm test