-
Notifications
You must be signed in to change notification settings - Fork 206
/
.travis.yml
47 lines (35 loc) · 1.17 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
dist: xenial
language: php
sudo: false
php:
- '7.3'
- '7.4'
branches:
only:
- master
- /^v?\d+\.\d+(\.\d+)?(-\S*)?$/
addons:
mariadb: '10.3'
before_script:
- 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
- composer self-update
- composer install --prefer-source --no-interaction --dev
script: XDEBUG_MODE=coverage ./vendor/bin/phpunit -c ./tests/phpunit.xml --testsuite Core
after_script:
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then mv ./tests/_output/coverage-clover.xml clover.xml && ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT -t clover; fi
notifications:
email:
recipients:
on_success: change # default: change
on_failure: always # default: always
env:
- DB_SERVER=127.0.0.1 DB_NAME=syspass DB_USER=root DB_PASS=
before_install:
- mysql -e 'DROP DATABASE IF EXISTS `'"$DB_NAME"'`;'
- mysql -e 'CREATE DATABASE `'"$DB_NAME"'` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;'
- mysql $DB_NAME < ./schemas/dbstructure.sql
cache:
directories:
- vendor