forked from SUSE/Portus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (61 loc) · 2.43 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
language: ruby
sudo: required
dist: trusty
rvm:
- 2.5.0
matrix:
allow_failures:
- rvm: ruby-head
cache:
directories:
- $PWD/travis_phantomjs
before_install:
- phantomjs --version
- export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
- if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi
- if [ $(phantomjs --version) != '2.1.1' ]; then wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi
- if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi
- phantomjs --version
# 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
script:
- chmod +x bin/ci.sh && ./bin/ci.sh
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'