Skip to content

Commit

Permalink
Merge 35264b7 into b95eef0
Browse files Browse the repository at this point in the history
  • Loading branch information
mpyw committed Jun 25, 2021
2 parents b95eef0 + 35264b7 commit 64eccae
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 47 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Test

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
php: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
composer_flags:
- --prefer-stable --prefer-lowest
- --prefer-stable

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug

- name: Adjust package versions
run: |
composer require phpunit/phpunit --dev --no-update
composer remove friendsofphp/php-cs-fixer --dev --no-update
if php -r 'exit((int)!version_compare(PHP_VERSION, "7.4", ">="));'; then
composer require doctrine/orm:^2.6.4 ${{ matrix.composer_flags }} --no-update
elif php -r 'exit((int)!version_compare(PHP_VERSION, "7.3", ">="));'; then
composer require doctrine/orm:^2.6.3 ${{ matrix.composer_flags }} --no-update
else
composer require doctrine/orm:^2.4.5 ${{ matrix.composer_flags }} --no-update
fi
if php -r 'exit((int)!version_compare(PHP_VERSION, "7.1", "<"));'; then
composer remove doctrine/cache --dev --no-update
fi
composer update ${{ matrix.composer_flags }}
- name: Display pacckage versions
run: composer show | grep -E '^(doctrine/|lampager/)'

- run: mkdir -p build/logs
- run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml

- name: Upload Coverage
uses: nick-invision/retry@v2
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
timeout_minutes: 1
max_attempts: 3
command: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"require-dev": {
"ext-json": "*",
"phpunit/phpunit": "^6.4",
"php-coveralls/php-coveralls": "^1.0",
"nilportugues/sql-query-formatter": "^1.2.2",
"friendsofphp/php-cs-fixer": "^3.0",
"doctrine/cache": "^1.11"
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected function setUpDatabase()
{
$config = Setup::createAnnotationMetadataConfiguration(
[__DIR__ . '/Entities'],
false,
true,
null,
null,
false
Expand Down

0 comments on commit 64eccae

Please sign in to comment.