Run unit tests (#1086)
* Run unit tests * Add scripts, cs fixer * Update composer.json
This commit is contained in:
parent
abe044eaf0
commit
5d11919868
|
@ -0,0 +1,39 @@
|
|||
name: Tests
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
php-tests:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
COMPOSER_NO_INTERACTION: 1
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php: [7.4, 7.3, 7.2]
|
||||
laravel: [7.*, 6.*, 5.5.*]
|
||||
dependency-version: [prefer-lowest, prefer-stable]
|
||||
exclude:
|
||||
- laravel: 5.5.*
|
||||
php: 7.4
|
||||
|
||||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
coverage: none
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
composer require "laravel/framework:${{ matrix.laravel }}" --no-update --no-progress
|
||||
composer update --${{ matrix.dependency-version }} --prefer-dist --no-suggest --no-progress
|
||||
|
||||
- name: Execute Unit Tests
|
||||
run: composer test
|
|
@ -19,8 +19,9 @@
|
|||
"symfony/finder": "^3|^4|^5"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": "^3.5|^4.0|^5.0",
|
||||
"phpunit/phpunit": "^6.0|^7.0|^8.5|^9.0"
|
||||
"orchestra/testbench": "^3.5.11|^4.0|^5.0",
|
||||
"phpunit/phpunit": "^6.0|^7.0|^8.5|^9.0",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -49,5 +50,10 @@
|
|||
"Debugbar": "Barryvdh\\Debugbar\\Facade"
|
||||
}
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"check-style": "phpcs -p --standard=PSR12 config/ resources/ src/ tests/",
|
||||
"fix-style": "phpcbf -p --standard=PSR12 config/ resources/ src/ tests/",
|
||||
"test": "phpunit"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue