-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
59 lines (47 loc) · 2.02 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
language: php
dist: trusty
sudo: required
jdk:
- oraclejdk8
matrix:
include:
- php: '5.4'
- php: '5.6'
- php: '7.0'
- php: hhvm
sudo: required
- php: nightly
allow_failures:
- php: hhvm
services:
- mysql
env:
global:
- secure: "FhxYfl4Z6YXM4lZ6Yfi+PJvxuGrijV+fiCoT5PYY+FC1cvH5nwBOa6x5jMt6tjRuKB5AKu0CjET37rVs69vDss8YMcXZ7oPJI0NxMxcZNTXPA1MJeAJnxk/uKaLjafpHVtWHPbAcpTRgFW6qjaYkd82LG5lpD6qw7hX/pE61Y+LkuIb1QIk1TtQY+0pDfQUl+h0F16uY0KBjjeC3Uc4Nn2duJAXaiec4psq5InIVk1GJvvmbt3++n+MnwsKkSF7QwLnJGFJGVsXkWp2uQIn9c38exJMnCzLphyPTEQ+pEgniV1ZFznVSpOSof7DJrOCRy90ZREVwmCSVPcvFxaqHNEXmQwTizUkHDCSCrR6d2yUZlz0A0FYO9hjFox3iUWp8uvoLdnSsEa1NiDVrbEy2GjdFeANvup9KepupxD8FwHd2trVRs8prAtIThPCcB7WbD5KNLhcfRAtCJuVxPfWuqgvC6gHs50cxydUjfzCI1Jl9d3y+MQbJlFtmqMBHJpWm6/kioWAAJJyU6BSDSxMTbaOsitw8rUFCzPG0JilPOEB9Vp4OmPXy4VpFlRoz4x1yDMIS41nZ6CR8Z/r36nTKqsejUw8GUBN3DM4SjxnTN+xp5DbSE9CjqBhu0M4UdM+aNi7K+AfRl1z0acIz8SSdbXHFVaEt67c8ZVZ7fSkALhg="
addons:
sonarcloud:
organization: "uglyoldbob-github"
before_script:
#check for php errors
- '! find ./web -type f -name "*.php" ! -path "./web/include/fpdf16/tutorial*" -exec php -d error_reporting=32767 -l {} \; 2>&1 >&- | grep "^"'
#workaround for hhvm and phpunit
- curl -sSLf -o ~/.phpenv/versions/hhvm/bin/phpunit https://phar.phpunit.de/phpunit-5.7.phar
#website setup steps
- cp ./example_config.ini ./web/config.ini
- sed -i -e "s,\"username\",\"travis\",g" ./web/config.ini
- sed -i -e "s,\"password\",\"\",g" ./web/config.ini
- sed -i -e "s,\"host_or_ip\",\"127.0.0.1\",g" ./web/config.ini
- sed -i -e "s,location_here,,g" ./web/config.ini
- mysql -e 'CREATE DATABASE db_name;'
- mysql db_name < ./skeleton.sql
install:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- echo "sonar.branch=$BRANCH " >> ./sonar-project.properties
script:
- phpunit
- sonar-scanner
cache:
directories:
- '$HOME/.sonar/cache'
after_success:
- bash <(curl -s https://codecov.io/bash)