-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (33 loc) · 1.06 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
# Config file for https://travis-ci.org/
os: linux
dist: bionic
language: php
# Define the php versions against we want to test our code
php:
- 7.2
- 7.3
- 7.4
# Note: Code coverage requires php-xDebug extension enabled on CI server
before_install:
- wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.4.0.2170-linux.zip
- unzip sonar-scanner-cli-4.4.0.2170-linux.zip
- mv sonar-scanner-4.4.0.2170-linux sonar
install:
- travis_retry composer install --no-interaction --no-suggest
# Testing the app (see phpunit.xml) for configs, generating Code Coverage report
script:
- composer test --
after_success:
# Submit coverage report to https://codecov.io
- bash <(curl -s https://codecov.io/bash) -f coverage/phpunit.coverage.xml
# Submit coverage report to self-hosted SonarQube
- sonar/bin/sonar-scanner -D sonar.host.url=$SONAR_HOST -D sonar.login=$SONAR_SECRET
#after_failure:
# Monitor only these branches
branches:
only:
- master
# You can delete the cache using travis-ci web interface
cache:
directories:
- $HOME/.composer/cache