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

Commit

Permalink
Use build stages for travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaeus committed Nov 12, 2018
1 parent 6e1f23e commit 8e86c3a
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# for php-coveralls
service_name: travis-ci
src_dir: ./
coverage_clover: build/logs/clover.xml
coverage_clover: clover.xml
69 changes: 44 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,55 @@ language: php
sudo: false
dist: trusty

php:
- 7.1
- 7.2
- 7.3
- nightly

matrix:
allow_failures:
- php: nightly

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

services:
- riak
- mongodb
- memcached
- redis-server
- riak
- mongodb
- memcached
- redis-server

jobs:
include:
# Test against lowest dependencies
- stage: Test
php: 7.1
env: COMPOSER_FLAGS="--prefer-lowest"

# Test against dev dependencies on the newest version
- stage: Test
php: 7.3
env: DEPS="dev"

before_script:
- ./Tests/travis/install-deps.sh
- composer self-update
- if [ "$DEPS" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;
- composer update --prefer-dist
- stage: Code Quality
php: 7.1
script:
- ./vendor/bin/phpcs -np --extensions=php --ignore=vendor/*,Tests/* --standard=ruleset.xml .
after_script:

before_install:
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

install:
- if [ "$DEPS" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;
- composer update --prefer-dist $COMPOSER_FLAGS

script:
- ./vendor/bin/phpunit -v --coverage-clover ./build/logs/clover.xml
- ./vendor/bin/phpcs -np --extensions=php --ignore=vendor/*,Tests/* --standard=ruleset.xml .
- mkdir build/logs
- ./vendor/bin/phpunit -v --coverage-clover clover.xml

after_script:
- php ./vendor/bin/coveralls -v

matrix:
allow_failures:
- php: nightly
include:
- php: 7.1
- php: 7.1
env: DEPS="dev"
- php: 7.2
- php: 7.3
- php: nightly
- php ./vendor/bin/coveralls -v
17 changes: 0 additions & 17 deletions Tests/travis/install-deps.sh

This file was deleted.

4 changes: 0 additions & 4 deletions Tests/travis/php.ini

This file was deleted.

0 comments on commit 8e86c3a

Please sign in to comment.