forked from maurobonfietti/rest-api-slim-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
36 lines (30 loc) · 1.03 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
language: php
php:
- '7.3'
- '7.4'
services:
- mysql
- redis-server
env:
global:
- CC_TEST_REPORTER_ID=5acc45b5f48d4ca2a5baa0d22ee9a10890b29a76b3ef34a936fdd0ba8c5d7ba8
- DB_HOSTNAME=127.0.0.1
- DB_DATABASE=rest_api_slim_php
- DB_USERNAME=root
- DB_PASSWORD=
- DISPLAY_ERROR_DETAILS=true
- APP_DOMAIN='https://www.awesome.com.ar'
- SECRET_KEY=YourSuperSecret-KeY
- REDIS_ENABLED=true
- REDIS_URL=localhost
before_install:
- mysql -e 'CREATE DATABASE rest_api_slim_php;'
before_script:
- mysql rest_api_slim_php < database/database.sql
- composer install
- 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
script:
- vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml --whitelist src
- if [ $(phpenv version-name) = "7.4" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi