-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
34 lines (28 loc) · 982 Bytes
/
.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
language: php
php:
- '7.2'
- '7.3'
services:
- mysql
- redis-server
env:
global:
- CC_TEST_REPORTER_ID=5acc45b5f48d4ca2a5baa0d22ee9a10890b29a76b3ef34a936fdd0ba8c5d7ba8
- DB_HOSTNAME=127.0.0.1
- DB_DATABASE=project_3s
- DB_USERNAME=nayananga
- DB_PASSWORD=952780816v
- USE_REDIS_CACHE=true
- REDIS_URL=localhost
- SECRET_KEY=YourSuperSecret-KeY
before_install:
- mysql -e 'CREATE DATABASE project_3s;'
before_script:
- mysql rest_api_slim_php < database/project_3s.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.3" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi