forked from phan/phan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
41 lines (34 loc) · 1.79 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
language: php
# The 0.12 releases can be used with any PHP version from 7.0 to 7.2.
php:
- 7.0
- 7.1
- 7.2
# NOTE: Travis starts up 5 tests at a time. So, it's easier to run all of the tests at once.
#env:
# - TEST_SUITES="PhanTest UtilTest PHP72Test RasmusTest LanguageTest __FakePHP70Test __FakeSelfTest __FakeSelfFallbackTest __FakeRewritingTest __FakePluginTest __FakeFallbackTest __FakeToolTest __FakeConfigOverrideTest"
sudo: false
dist: trusty
cache:
directories:
- $HOME/.composer/cache
- $HOME/.cache/phan-ast/build
- $HOME/.phan-ci
# We invoke php multiple times via CLI in several tests, so enable the opcache file cache.
before_install:
- ./tests/travis_setup.sh
- mkdir /tmp/opcache || true; echo -e 'opcache.enable_cli=1\nopcache.file_cache=/tmp/opcache' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- composer validate
# --classmap-authoritative shouldn't affect phan's behavior, but is faster.
# Use it for travis and published phars.
install:
- composer --prefer-dist --classmap-authoritative install
# TEST_SUITES contains 1 or more space-separated value for TEST_SUITE
# We have a fake TEST_SUITE which runs phan, and check if the exit code is non-zero and the standard output is non-empty.
# This is used instead of a unit test because Phan currently caches too much state for this to be run with other unit tests, and the configuration might end up different within a unit test.
# This was moved into a separate script to stop cluttering up .travis.yml
script:
# Previously - for TEST_SUITE in $TEST_SUITES; do echo "Running $TEST_SUITE"; tests/run_test "$TEST_SUITE" || exit $?; done
# NOTE: GNU parallel is not available on travis, and because we don't have sudo, it's inconvenient to install
- tests/run_all_tests
- php internal/package.php