Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Commit 17072b1

Browse files
committed
Use build stages for travis-ci
1 parent 6e1f23e commit 17072b1

File tree

4 files changed

+43
-47
lines changed

4 files changed

+43
-47
lines changed

.coveralls.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# for php-coveralls
22
service_name: travis-ci
33
src_dir: ./
4-
coverage_clover: build/logs/clover.xml
4+
coverage_clover: clover.xml

.travis.yml

Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,53 @@ language: php
22
sudo: false
33
dist: trusty
44

5+
php:
6+
- 7.1
7+
- 7.2
8+
- 7.3
9+
- nightly
10+
11+
matrix:
12+
allow_failures:
13+
- php: nightly
14+
515
cache:
6-
directories:
7-
- $HOME/.composer/cache
16+
directories:
17+
- $HOME/.composer/cache
818

919
services:
10-
- riak
11-
- mongodb
12-
- memcached
13-
- redis-server
20+
- mongodb
21+
- memcached
22+
- redis-server
23+
24+
jobs:
25+
include:
26+
# Test against lowest dependencies
27+
- stage: Test
28+
php: 7.1
29+
env: COMPOSER_FLAGS="--prefer-lowest"
30+
31+
# Test against dev dependencies on the newest version
32+
- stage: Test
33+
php: 7.3
34+
env: DEPS="dev"
1435

15-
before_script:
16-
- ./Tests/travis/install-deps.sh
17-
- composer self-update
18-
- if [ "$DEPS" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;
19-
- composer update --prefer-dist
36+
- stage: Code Quality
37+
php: 7.1
38+
script:
39+
- ./vendor/bin/phpcs -np --extensions=php --ignore=vendor/*,Tests/* --standard=ruleset.xml .
40+
after_script:
41+
42+
before_install:
43+
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
44+
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
45+
46+
install:
47+
- if [ "$DEPS" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;
48+
- composer update --prefer-dist $COMPOSER_FLAGS
2049

2150
script:
22-
- ./vendor/bin/phpunit -v --coverage-clover ./build/logs/clover.xml
23-
- ./vendor/bin/phpcs -np --extensions=php --ignore=vendor/*,Tests/* --standard=ruleset.xml .
51+
- ./vendor/bin/phpunit -v --coverage-clover clover.xml
2452

2553
after_script:
26-
- php ./vendor/bin/coveralls -v
27-
28-
matrix:
29-
allow_failures:
30-
- php: nightly
31-
include:
32-
- php: 7.1
33-
- php: 7.1
34-
env: DEPS="dev"
35-
- php: 7.2
36-
- php: 7.3
37-
- php: nightly
54+
- php ./vendor/bin/coveralls -v

Tests/travis/install-deps.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

Tests/travis/php.ini

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)