forked from kiwitcms/Kiwi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (68 loc) · 3.22 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
dist: xenial
sudo: required
language: python
python:
- "3.6"
cache: pip
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "AFMd4dRA1psBKd1LohQMxwL9vmAUvPrMzvBiU4w6mRX87Sskz69sLXAXivYvl/Eli+vzqIQat0VFOuymC4ScKhON1rbSJ5F/DQElToAPPNT2GXIaMCRA+ILOX28wFvC6/wqpvYuIf4yN19t2rSkNy0AqTH1RhPNkCHyiMcs0V6ztmlxobn1F9TYPCO8i1B+ZFez7rnUeQVaoXW3Cv4X8rjbkBd9iQQF/wfn8k71LeY2KB0fCxmjzFDQwXLnldka4lLWRuTPBcdKf57MveorMSJ5afLr/wd4IXKdoM3oUa6Us73T1+OvC3cOVlG7z49bP5VVz0xMq6qcmnQEOxMhO8wUNtkMssBz89BwC39LKMOxcASFF8F5joTWCfN+s2k2bsV/lNuKCspOEji+KTdSnMFMlo3LxQ8rt1cMNOrHvnmYJjteQ00IXrXhxdFeGGOrko0qQU1iPW4FjRsHOeNqdMMDKKvTO27odgJbNYF7lo3nWgPXVGqteMhpvxnoS2JR9ettGZJQueDrAzSmCe9Akc0hGwvyUTsyjaYLIAdxmaqKZtu1G+Otep11Rjf0gXaNLSZ/Pm02BHrOdLqTsRuTihHuR/W2HHuJrw44u2nF/3oer+bfAAGpdK0e6NqaZgmLSEN340FDcJ9sG6oGMo6cYGQWqzNUf3/gS4K7TvWhw10M="
services:
- mysql
jobs:
include:
- if: branch = master AND type = push
env:
- CMD=coverity
addons:
coverity_scan:
project:
name: "kiwitcms/Kiwi"
description: "Open source test case management system"
notification_email: info@kiwitcms.org
build_command: "--no-command --fs-capture-search ./ --fs-capture-search $(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')"
branch_pattern: master
- if: branch = master AND type = push
env:
- CMD=test
- TEST_DB=MySQL
before_install:
- echo -n | openssl s_client -connect https://scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
- |
if [ "$TEST_DB" == "MySQL" ]; then
cat "$TRAVIS_BUILD_DIR/99-charset.cnf" | sudo tee -a /etc/mysql/conf.d/mariadb.cnf
sudo cat /etc/mysql/conf.d/mariadb.cnf
sudo service mysql restart
mysql -e 'SELECT VERSION();'
mysql -e 'CREATE USER "kiwi" IDENTIFIED BY "kiwi";'
mysql -e 'CREATE DATABASE kiwi CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'
mysql -e 'GRANT ALL PRIVILEGES ON kiwi.* TO kiwi;'
mysql -e 'CREATE DATABASE test_kiwi CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'
mysql -e 'GRANT ALL PRIVILEGES ON test_kiwi.* TO kiwi;'
fi
install:
- |
[ -z "$TEST_DB" ] && export TEST_DB="SQLite"
export REQUIREMENTS_TXT="requirements/$(echo $TEST_DB | tr '[:upper:]' '[:lower:]' | sed 's/mysql/mariadb/' | sed 's/sqlite/base/').txt"
echo "REQUIREMENTS_TXT=$REQUIREMENTS_TXT"
pip install -r $REQUIREMENTS_TXT
pip install -r requirements/devel.txt
pushd tcms/ && npm install && popd
before_script:
- wget https://repo.mysql.com/mysql-apt-config_0.8.16-1_all.deb
- sudo dpkg -i mysql-apt-config_0.8.16-1_all.deb
- sudo apt-get update -q
- sudo apt-get install -q -y --allow-unauthenticated -o Dpkg::Options::=--force-confnew mysql-server
- sudo systemctl restart mysql
- sudo mysql_upgrade
- mysql --version
script: make $CMD
after_success:
- |
bash <(curl -s https://codecov.io/bash)
notifications:
email:
on_failure: change
on_success: never