forked from byjg/php-swagger-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
19 lines (17 loc) · 799 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
language: php
php:
- "7.4"
- "7.3"
- "7.2"
- "7.1"
install:
- export SONARSCANNER_VERSION=3.2.0.1227
- wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONARSCANNER_VERSION-linux.zip
- unzip sonar-scanner-cli-$SONARSCANNER_VERSION-linux.zip
- composer install
- SPEC=swagger php -S 127.0.0.1:8080 tests/rest/app.php &
- SPEC=openapi php -S 127.0.0.1:8081 tests/rest/app.php &
script:
- vendor/bin/phpunit --coverage-clover phpunit.coverage.xml --log-junit phpunit.report.xml
- if [ "$TRAVIS_BRANCH" != "master" ]; then export SONARSCANNER_PARAM="-Dsonar.branch.name=$TRAVIS_BRANCH -Dsonar.branch.target=master"; fi
- sonar-scanner-$SONARSCANNER_VERSION-linux/bin/sonar-scanner -Dsonar.login=$SONAR_LOGIN $SONARSCANNER_PARAM || true