autowp/zf-components

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: php
php:
  - '7.4'

addons:
  sonarcloud:
    organization: "autowp-github"
    token:
      secure: $SONARCLOUD_TOKEN

before_script:
  - composer install --no-progress --no-interaction --no-suggest
  - curl -Ls https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  - chmod +x ./cc-test-reporter

script:
  - ./cc-test-reporter before-build || travis_terminate 1;
  - composer cs-check || travis_terminate 1;
  - composer phpmd || travis_terminate 1;
  - ./vendor/bin/psalm || travis_terminate 1;
  - ./vendor/bin/phpunit --log-junit test/logs/junit.xml --coverage-clover ./clover.xml || travis_terminate 1;

after_script:
  - sonar-scanner -Dsonar.login=$SONARCLOUD_TOKEN || travis_terminate 1;
  - ./vendor/bin/php-coveralls -v -x ./clover.xml
  - ./cc-test-reporter after-build -t clover --exit-code $TRAVIS_TEST_RESULT ./clover.xml