-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
71 lines (54 loc) · 1.58 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
language:
- php
dist: xenial
sudo: true
git:
depth: false
php:
- 7.4
env:
global:
- DB=mysql
- XDEBUG_MODE=coverage
- MY_REPORTS_PATH=/home/travis/build/giumar/fortunecookies
- CC_TEST_REPORTER_ID=0b3e8b1e905bbea0d9d991090bf84a74404b256065bac4216a89890741416b31
services:
- mysql
mysql:
database: test_fc
username: root
encoding: utf8
jobs:
fast_finish: true
addons:
code_climate:
repo_token: 0b3e8b1e905bbea0d9d991090bf84a74404b256065bac4216a89890741416b31
sonarcloud:
organization: "giumar"
token: $SONAR_TOKEN
before_script:
- composer selfupdate
- composer install --prefer-dist --no-suggest --no-interaction
- cp ./.travis_app_local_mysql.txt ./config/app_local.php
- php bin/cake.php migrations migrate
- 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
before_install:
- mysql -e 'CREATE DATABASE IF NOT EXISTS test_fc;'
- mysql -e 'CREATE DATABASE IF NOT EXISTS fc;'
- nvm install --lts node
install:
#- npm install
script:
- vendor/bin/phpunit --coverage-clover=${MY_REPORTS_PATH}/phpunit-coverage.xml --log-junit=${MY_REPORTS_PATH}/phpunit-tests.xml --color=auto
- cp ${MY_REPORTS_PATH}/phpunit-coverage.xml clover.xml
- sonar-scanner
after_success:
- bash <(curl -s https://codecov.io/bash)
- ./cc-test-reporter after-build -t clover --exit-code $TRAVIS_TEST_RESULT
cache:
directories:
- $HOME/.composer/cache
notifications:
email: false