-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
44 lines (35 loc) · 1.08 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
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