forked from SUSE/Portus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (61 loc) · 2.19 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
language: ruby
sudo: required
dist: trusty
rvm:
- 2.5.0
matrix:
allow_failures:
- rvm: ruby-head
before_install:
# Use the latest stable Node.js
- nvm install stable
- nvm use stable
# Install Yarn
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt-get update
- sudo apt-get install yarn
- yarn install
# Install bats.
- git clone https://github.com/sstephenson/bats.git
- cd bats
- sudo ./install.sh /usr/local
- cd .. && rm -rf bats
# Intall Go, which is needed for git-validation
- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.10.2 bash)"
- go get -u github.com/vbatts/git-validation
before_script:
- mysql -e 'create database portus_test;'
- psql -c 'create database portus_test' -U postgres
# fix for chrome headless
- export DISPLAY=:99.0 && sh -e /etc/init.d/xvfb start && sleep 3
# Code climate,
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- chmod +x bin/ci.sh && ./bin/ci.sh
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
env:
global:
# OSC_CREDENTIALS are kept secret
# In order to update them, run:
# travis encrypt OSC_CREDENTIALS=user:password
# more info at: http://docs.travis-ci.com/user/environment-variables/#Secure-Variables
- OBS_REPO=Virtualization:containers:Portus
- OBS_BRANCH=master
- secure: "SgH8Wvm6n71GTZqTk2Ww/vLg3KK1QhgBMRSs+85TFemJvUDEWLKtANGI2szlqJOfOEWqHZ4rdzgMamtYfGmOZvjUBebaIXlYMcPyKSmcQZX/80R1/v7KFyhP2vqrb+ok/rK6lLXX06jDhohUS04vnx4i1EtoxH62dKImdlZsjzI="
# DB options for both adapters and Travis.
- PORTUS_DB_USERNAME=travis
matrix:
- PORTUS_DB_ADAPTER=mysql2
- PORTUS_DB_ADAPTER=postgresql
after_success:
- packaging/suse/package_and_push_to_obs.sh
addons:
code_climate:
repo_token: 18a0cf6c35e0c801678f12f444051c33e0390ce0efa91ec06a2aa5068b10c19e
mariadb: '10.2'
postgresql: '9.6'
chrome: stable