sciphp/numphp

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: php

dist: bionic

cache:
  directories:
    - $HOME/.composer/cache

php:
  - 7.2
  - 7.3
  - 7.4
  - 8.0
  - nightly

matrix:
  allow_failures:
    - php: nightly

before_install:
 - sudo apt-get install -qq python3-pip python3-scipy
 - pip3 install numpy
 - python3 -c "import numpy; print(numpy.__version__)"

install:
  - composer install --prefer-source --no-interaction
  # PHPUnit
  - ./vendor/bin/phpunit --version

before_script:
    # Install Code climate reporter
    - if [ "$TRAVIS_PHP_VERSION" = "8.0" ]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter; fi
    - if [ "$TRAVIS_PHP_VERSION" = "8.0" ]; then chmod +x ./cc-test-reporter; fi
    - if [ "$TRAVIS_PHP_VERSION" = "8.0" ]; then ./cc-test-reporter before-build; fi

script:
  # Run PHP unit tests
  - ./vendor/bin/phpunit -c test/Unit/phpunit.xml.dist
  # Run benchmark tests
  - ./test/Benchmark/bench.sh

after_script:
  # Code climate
  - if [ "$TRAVIS_PHP_VERSION" = "8.0" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi