Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit 4818354

Browse files
committed
added new travis.yml configs
1 parent 7d338df commit 4818354

File tree

5 files changed

+52
-60
lines changed

5 files changed

+52
-60
lines changed

.travis.yml

+39-30
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,55 @@
1+
dist: trusty
12
language: php
23

3-
sudo: false
4-
54
env:
65
global:
7-
- TEST="./vendor/bin/phpunit"
8-
9-
matrix:
10-
include:
11-
- php: 7.1
12-
env: CS=true
13-
- php: 7.1
14-
env: PHPUNIT=true
15-
- php: 7.1
16-
env: PHPSTAN=true
17-
- php: 7.2
18-
env: PHPUNIT=true SEND_COVERAGE=true PHP_VERSION=7.2
19-
fast_finish: true
6+
- TEST="./vendor/bin/phpunit --verbose"
7+
- COMPOSER_UP="composer update --no-interaction --prefer-dist --no-progress --profile --no-suggest"
208

219
cache:
10+
yarn: true
2211
directories:
2312
- $HOME/.composer/cache
2413
- $HOME/.php-cs-fixer
2514

2615
before_install:
27-
- composer validate
28-
29-
before_script:
30-
- chmod a+x ./build/travis/script.sh && chmod a+x ./build/travis/after_success.sh
16+
- stty cols 120
17+
- chmod a+x ./build/travis/configure_php.sh
18+
- ./build/travis/configure_php.sh
3119

3220
install:
33-
- travis_retry composer install --no-interaction --prefer-dist --no-progress --profile --no-suggest
34-
- if [[ "$PHP_VERSION" = 7.2 ]]; then composer req --dev viserio/http; fi
35-
36-
script:
37-
- ./build/travis/script.sh
21+
- composer global require hirak/prestissimo
22+
- $COMPOSER_UP
3823

39-
after_success:
40-
- ./build/travis/after_success.sh
24+
jobs:
25+
include:
26+
- stage: Test
27+
php: 7.1
28+
env: REMOVE_XDEBUG=true
29+
- stage: Test
30+
php: 7.2
31+
env: REMOVE_XDEBUG=true
32+
33+
- stage: Coding standard
34+
php: 7.2
35+
env: REMOVE_XDEBUG=true
36+
script:
37+
- ./vendor/bin/php-cs-fixer fix --verbose --diff --dry-run
38+
- stage: Coding standard
39+
php: 7.2
40+
env: REMOVE_XDEBUG=false
41+
script:
42+
- ./vendor/bin/phpstan analyse -c phpstan.neon -l 7 src
43+
44+
- stage: Coverage
45+
php: 7.2
46+
env: REMOVE_XDEBUG=false
47+
script:
48+
- bash -xc "$TEST -c ./phpunit.xml.dist --coverage-clover=coverage.xml"
49+
after_success:
50+
- bash <(curl -s https://codecov.io/bash)
4151

4252
notifications:
43-
email: false
44-
webhooks:
45-
urls:
46-
- https://webhooks.gitter.im/e/5886ad33ac123a7c06b0
53+
email:
54+
on_success: never
55+
on_failure: change

build/travis/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Build Scripts
2+
3+
This directory contains the scripts that travis uses to build the project.
4+
5+
Tests on the entire [`narrowspark/http-message`](https://github.com/narrowspark/http-message) repository,
6+
and then sends code coverage reports out to [Codecov](https://codecov.io/github/narrowspark/http-message).

build/travis/after_success.sh

-5
This file was deleted.

build/travis/configure_php.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
if [[ "$REMOVE_XDEBUG" = true ]]; then
4+
phpenv config-rm xdebug.ini;
5+
fi
6+
7+
echo date.timezone = Europe/Berlin >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

build/travis/script.sh

-25
This file was deleted.

0 commit comments

Comments
 (0)