Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Tests

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: [ '7.2', '7.3', '7.4' ]
dependency-version: [ prefer-stable ]
include:
- { php-version: 7.2, dependency-version: prefer-lowest }

name: PHP ${{ matrix.php-version }} - ${{ matrix.dependency-version }}

steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Install dependencies
run: composer update --no-interaction --prefer-dist --${{ matrix.dependency-version}} --no-progress --no-suggest
- name: Run test suite
run: vendor/bin/phpunit
31 changes: 9 additions & 22 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,16 @@
],
"require": {
"php": ">=7.2",
"doctrine/orm": "~2.7"
"doctrine/annotations": "^1.8",
"doctrine/cache": "^1.9.1",
"doctrine/common": "^2.11",
"doctrine/dbal": "^2.9.3",
"doctrine/event-manager": "^1.1",
"doctrine/orm": "^2.7",
"doctrine/persistence": "^1.3|^2.0"
},
"require-dev": {
"mayflower/php-codebrowser": "^2.3",
"php-coveralls/php-coveralls": "^2.4",
"phploc/phploc": "^5.0",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^8.5",
"roave/security-advisories": "dev-master",
"sebastian/phpcpd": "^4.1",
"squizlabs/php_codesniffer": "^3.3"
},
"scripts": {
"test": "vendor/bin/phpunit",
"test-coverage": "@php vendor/bin/phpunit --colors=always --coverage-html=build/html-coverage",
"sniff": "@php vendor/bin/phpcs",
"format": "@php vendor/bin/phpcbf",
"phploc": "@php vendor/bin/phploc src > build/phploc.txt",
"phpcpd": "@php vendor/bin/phpcpd src tests",
"phpstan": "@php -d memory_limit=-1 vendor/bin/phpstan analyse src"
"phpunit/phpunit": "^8.5"
},
"autoload": {
"psr-0": {
Expand All @@ -49,9 +39,6 @@
]
},
"config": {
"sort-packages": true,
"platform": {
"php": "7.2.24"
}
"sort-packages": true
}
}
Loading