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

Commit

Permalink
Refactor and package configuration
Browse files Browse the repository at this point in the history
Added tests and changed structore of the package

WORK IN PROGRESS
  • Loading branch information
michalbundyra committed Dec 6, 2018
1 parent b50a1b4 commit d0375e0
Show file tree
Hide file tree
Showing 38 changed files with 2,651 additions and 231 deletions.
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage_clover: clover.xml
json_path: coveralls-upload.json
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/.coveralls.yml export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/composer.lock export-ignore
/phpcs.xml export-ignore
/phpunit.xml.dist export-ignore
/test/ export-ignore
62 changes: 62 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
language: php

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

env:
global:
- COMPOSER_ARGS="--no-interaction"
- COVERAGE_DEPS="php-coveralls/php-coveralls"

matrix:
include:
- php: 7.1
env:
- DEPS=lowest
- php: 7.1
env:
- DEPS=locked
- CS_CHECK=true
- TEST_COVERAGE=true
- php: 7.1
env:
- DEPS=latest
- php: 7.2
env:
- DEPS=lowest
- php: 7.2
env:
- DEPS=locked
- php: 7.2
env:
- DEPS=latest
- php: 7.3
env:
- DEPS=lowest
- php: 7.3
env:
- DEPS=locked
- php: 7.3
env:
- DEPS=latest

before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi

install:
- travis_retry composer install $COMPOSER_ARGS
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
- stty cols 120 && composer show

script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi

after_script:
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry php vendor/bin/php-coveralls -v ; fi

notifications:
email: false
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![Build Status](https://travis-ci.com/webimpress/phpunit-migration.svg?branch=master)](https://travis-ci.com/webimpress/phpunit-migration)
[![Coverage Status](https://coveralls.io/repos/github/webimpress/phpunit-migration/badge.svg?branch=master)](https://coveralls.io/github/webimpress/phpunit-migration?branch=master)

# PHPUnit migration tool

Migrate project to the newest version of PHPUnit.
Expand Down
32 changes: 27 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
{
"name": "webimpress/phpunit-migration",
"description": "Migrate your tests to newest PHPUnit version",
"description": "Migrate your tests to the newest PHPUnit version",
"license": "BSD-2-Clause",
"config": {
"sort-packages": true
},
"require": {
"php": "^7.1",
"symfony/console": "^4.0",
"composer/semver": "^1.4.2"
"composer/semver": "^1.4.2",
"symfony/console": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^7.4.5",
"webimpress/coding-standard": "dev-master"
},
"license": "BSD-2-Clause",
"bin": ["bin/phpunit-migration"],
"autoload": {
"psr-4": {
"Webimpress\\PHPUnitMigration\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"WebimpressTest\\PHPUnitMigration\\": "test/"
}
},
"bin": ["bin/phpunit-migration"],
"scripts": {
"check": [
"@cs-check",
"@test"
],
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
}
}
Loading

0 comments on commit d0375e0

Please sign in to comment.