mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-04 02:14:06 +02:00
42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
dist: trusty
|
|
sudo: false
|
|
language: php
|
|
php:
|
|
- '7.1'
|
|
|
|
addons:
|
|
postgresql: "9.6"
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.composer/cache/files
|
|
|
|
env:
|
|
global:
|
|
- DB_TYPE=pgsql
|
|
- DB_HOST=localhost
|
|
- DB_USERNAME=postgres
|
|
- DB_PASSWORD=
|
|
- DB_DATABASE=travis_ci_test
|
|
- BASE_HOST=example.com
|
|
- DEMO_ROOT=/tmp/demos
|
|
|
|
install:
|
|
- composer install --no-interaction
|
|
- npm install
|
|
|
|
before_script:
|
|
- phpenv config-add travis.php.ini
|
|
- psql -c 'create database travis_ci_test;' -U postgres
|
|
- wget https://raw.githubusercontent.com/demostf/db/master/schema.sql
|
|
- psql -U postgres -d travis_ci_test -f schema.sql
|
|
- echo "error_reporting = E_ALL & ~E_DEPRECATED" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini #random-lib complains about mcrypt
|
|
|
|
script:
|
|
- phpunit --coverage-clover coverage.xml --configuration test/phpunit.xml
|
|
- IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${$TRAVIS_COMMIT_RANGE}")); unset IFS
|
|
- vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --allow-risky yes --stop-on-violation --using-cache=no --path-mode=intersection -- "${COMMIT_SCA_FILES[@]}"
|
|
- node node_modules/.bin/mocha --recursive
|
|
|
|
after_success:
|
|
- bash <(curl -s https://codecov.io/bash)
|