Files
sysPass/.travis.yml
2020-12-20 17:51:32 +01:00

48 lines
1.2 KiB
YAML

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:
- nuxsmin@syspass.org
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