Skip to content

Commit

Permalink
Merge cfe9311 into 8f27bb4
Browse files Browse the repository at this point in the history
  • Loading branch information
wdes-bot committed Jul 30, 2020
2 parents 8f27bb4 + cfe9311 commit a945783
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 34 deletions.
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitattributes
@@ -0,0 +1,4 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpcs.xml export-ignore
69 changes: 41 additions & 28 deletions .travis.yml
@@ -1,41 +1,54 @@
sudo: false
dist: xenial

language: php

stages:
- name: "Lint"
- name: "PHP Unit tests"

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

matrix:
fast_finish: true
include:
- php: 7.1
env:
- EXECUTE_CS_CHECK=true
- EXECUTE_TEST_COVERALLS=true
- PATH="$HOME/.local/bin:$PATH"
- php: nightly
allow_failures:
- php: nightly

before_install:
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- composer self-update
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls:dev-master ; fi
- $HOME/.composer/cache/

install:
- travis_retry composer install --no-interaction
- composer info -i
- composer install --no-interaction

script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then vendor/bin/phpunit --coverage-clover clover.xml ; fi
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then vendor/bin/phpunit ; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then vendor/bin/phpcs ; fi
- ./vendor/bin/phpunit --coverage-clover clover.xml

after_success:
- wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.2.0/php-coveralls.phar
- chmod +x php-coveralls.phar
- php php-coveralls.phar --verbose --coverage_clover clover.xml --json_path coveralls-upload.json

jobs:
allow_failures:
- php: nightly

after_script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then vendor/bin/coveralls ; fi
include:
- stage: "Lint"
name: "Lint files"
before_install: phpenv config-rm xdebug.ini
after_success: skip
script: ./vendor/bin/phpcs

- stage: "PHP Unit tests"
php: 7.1
name: "PHP 7.1"
- stage: "PHP Unit tests"
php: 7.2
name: "PHP 7.2"
- stage: "PHP Unit tests"
php: 7.3
name: "PHP 7.3"
- stage: "PHP Unit tests"
php: 7.4
name: "PHP 7.4"
- stage: "PHP Unit tests"
php: nightly
name: "PHP nightly"
install:
- composer install --no-interaction --ignore-platform-reqs

notifications:
email: true
7 changes: 4 additions & 3 deletions composer.json
Expand Up @@ -5,17 +5,18 @@
"authors": [
{
"name": "Ben Scholzen 'DASPRiD'",
"email": "mail@dasprids.de",
"homepage": "https://dasprids.de/",
"email": "mail@dasprids.de"
"role": "Developer"
}
],
"keywords": [
"enum",
"map"
],
"require-dev": {
"phpunit/phpunit": "^6.4",
"squizlabs/php_codesniffer": "^3.1"
"phpunit/phpunit": "^7 | ^8 | ^9",
"squizlabs/php_codesniffer": "^3.4"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion test/AbstractEnumTest.php
Expand Up @@ -14,7 +14,7 @@

final class AbstractEnumTest extends TestCase
{
public function setUp()
public function setUp(): void
{
$reflectionClass = new ReflectionClass(AbstractEnum::class);

Expand Down

0 comments on commit a945783

Please sign in to comment.