mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 23:17:47 +01:00
move tests to tests files
This commit is contained in:
@@ -0,0 +1,122 @@
|
||||
name: Running tests
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '* * * * *'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
laravel: [8.*, 7.*, 6.*, 5.8.*, 5.7.*, 5.6.*, 5.5.*, 5.4.*, 5.3.*, 5.2.*, 5.1.*, 5.0.*, 4.2.*, 4.1.*, 4.0.*]
|
||||
os:
|
||||
- ubuntu-latest
|
||||
# - macos-latest
|
||||
# - windows-latest
|
||||
include:
|
||||
- laravel: 8.*
|
||||
testbench: 6.*
|
||||
php: 7.3
|
||||
phpunit: 9.3.*
|
||||
|
||||
- laravel: 7.*
|
||||
testbench: 5.*
|
||||
php: 7.3
|
||||
phpunit: 8.4.*
|
||||
|
||||
- laravel: 6.*
|
||||
testbench: 4.*
|
||||
php: 7.2
|
||||
phpunit: 8.3.*
|
||||
|
||||
- laravel: 5.8.*
|
||||
testbench: 3.8.*
|
||||
php: 7.1
|
||||
phpunit: 7.5.*
|
||||
|
||||
- laravel: 5.7.*
|
||||
testbench: 3.7.*
|
||||
php: 7.1
|
||||
phpunit: 7.0.*
|
||||
|
||||
- laravel: 5.6.*
|
||||
testbench: 3.6.*
|
||||
php: 7.1
|
||||
phpunit: 7.0.*
|
||||
|
||||
- laravel: 5.5.*
|
||||
testbench: 3.5.*
|
||||
php: 7.0
|
||||
phpunit: 6.0.*
|
||||
|
||||
- laravel: 5.4.*
|
||||
testbench: 3.4.*
|
||||
php: 5.6
|
||||
phpunit: 5.7.*
|
||||
|
||||
- laravel: 5.3.*
|
||||
testbench: 3.3.*
|
||||
php: 5.6
|
||||
phpunit: 4.8.*
|
||||
|
||||
- laravel: 5.2.*
|
||||
testbench: 3.2.*
|
||||
php: 5.5
|
||||
phpunit: 4.8.*
|
||||
|
||||
- laravel: 5.1.*
|
||||
testbench: 3.1.*
|
||||
php: 5.5
|
||||
phpunit: 4.8.*
|
||||
|
||||
- laravel: 5.0.*
|
||||
testbench: 3.0.*
|
||||
php: 5.4
|
||||
phpunit: 4.8.*
|
||||
|
||||
- laravel: 4.2.*
|
||||
testbench: 2.2.*
|
||||
php: 5.4
|
||||
phpunit: 4.8.*
|
||||
|
||||
- laravel: 4.1.*
|
||||
testbench: 2.1.*
|
||||
php: 5.4
|
||||
phpunit: 4.8.*
|
||||
|
||||
- laravel: 4.0.*
|
||||
testbench: 2.0.*
|
||||
php: 5.4
|
||||
phpunit: 4.8.*
|
||||
|
||||
name: ${{ matrix.os }} - L${{ matrix.laravel }} - P${{ matrix.php }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.composer/cache/files
|
||||
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
|
||||
ini-values: memory_limit=-1
|
||||
coverage: none
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
composer require "laravel/framework:${{ matrix.laravel }}" "phpunit/phpunit:${{ matrix.phpunit }}" "orchestra/testbench:${{ matrix.testbench }}" monolog/monolog --no-interaction --no-update
|
||||
composer update --prefer-dist --no-interaction --no-suggest
|
||||
|
||||
- name: Execute tests
|
||||
run: vendor/bin/phpunit --configuration=phpunit-laravel.xml
|
||||
@@ -1,36 +0,0 @@
|
||||
name: PHP Composer
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Validate composer.json and composer.lock
|
||||
run: composer validate --strict
|
||||
|
||||
- name: Cache Composer packages
|
||||
id: composer-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-progress
|
||||
|
||||
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
|
||||
# Docs: https://getcomposer.org/doc/articles/scripts.md
|
||||
|
||||
# - name: Run test suite
|
||||
# run: composer run-script test
|
||||
@@ -0,0 +1,164 @@
|
||||
name: Running tests
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '* * * * *'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
symfony:
|
||||
- 5.4.*
|
||||
- 5.3.*
|
||||
- 5.2.*
|
||||
- 5.1.*
|
||||
- 5.0.*
|
||||
- 4.4.*
|
||||
- 4.3.*
|
||||
- 4.2.*
|
||||
- 4.1.*
|
||||
- 4.0.*
|
||||
- 3.4.*
|
||||
- 3.3.*
|
||||
- 3.2.*
|
||||
- 3.1.*
|
||||
- 3.0.*
|
||||
- 2.8.*
|
||||
- 2.7.*
|
||||
- 2.6.*
|
||||
- 2.5.*
|
||||
- 2.4.*
|
||||
- 2.3.*
|
||||
- 2.2.*
|
||||
- 2.1.*
|
||||
- 2.0.*
|
||||
|
||||
include:
|
||||
- symfony: 5.4.*
|
||||
php: 7.2
|
||||
phpunit: 8.3.*
|
||||
|
||||
- symfony: 5.3.*
|
||||
php: 7.2
|
||||
phpunit: 8.3.*
|
||||
|
||||
- symfony: 5.2.*
|
||||
php: 7.2
|
||||
phpunit: 8.3.*
|
||||
|
||||
- symfony: 5.1.*
|
||||
php: 7.2
|
||||
phpunit: 8.3.*
|
||||
|
||||
- symfony: 5.0.*
|
||||
php: 7.2
|
||||
phpunit: 8.3.*
|
||||
|
||||
- symfony: 4.4.*
|
||||
php: 7.1
|
||||
phpunit: 7.0.*
|
||||
|
||||
- symfony: 4.3.*
|
||||
php: 7.1
|
||||
phpunit: 7.0.*
|
||||
|
||||
- symfony: 4.2.*
|
||||
php: 7.1
|
||||
phpunit: 7.0.*
|
||||
|
||||
- symfony: 4.1.*
|
||||
php: 7.1
|
||||
phpunit: 7.0.*
|
||||
|
||||
- symfony: 4.0.*
|
||||
php: 7.1
|
||||
phpunit: 7.0.*
|
||||
|
||||
- symfony: 3.4.*
|
||||
php: 5.5
|
||||
phpunit: 4.8.36
|
||||
|
||||
- symfony: 3.3.*
|
||||
php: 5.5
|
||||
phpunit: 4.8.36
|
||||
|
||||
- symfony: 3.2.*
|
||||
php: 5.5
|
||||
phpunit: 4.8.36
|
||||
|
||||
- symfony: 3.1.*
|
||||
php: 5.5
|
||||
phpunit: 4.8.36
|
||||
|
||||
- symfony: 3.0.*
|
||||
php: 5.5
|
||||
phpunit: 4.8.36
|
||||
|
||||
- symfony: 2.8.*
|
||||
php: 5.3
|
||||
phpunit: 4.8.36
|
||||
|
||||
- symfony: 2.7.*
|
||||
php: 5.3
|
||||
phpunit: 4.8.36
|
||||
|
||||
- symfony: 2.6.*
|
||||
php: 5.3
|
||||
phpunit: 4.8.36
|
||||
|
||||
- symfony: 2.5.*
|
||||
php: 5.3
|
||||
phpunit: 4.8.36
|
||||
|
||||
- symfony: 2.4.*
|
||||
php: 5.3
|
||||
phpunit: 4.8.36
|
||||
|
||||
- symfony: 2.3.*
|
||||
php: 5.3
|
||||
phpunit: 4.8.36
|
||||
|
||||
- symfony: 2.2.*
|
||||
php: 5.3
|
||||
phpunit: 4.8.36
|
||||
|
||||
- symfony: 2.1.*
|
||||
php: 5.3
|
||||
phpunit: 4.8.36
|
||||
|
||||
- symfony: 2.0.*
|
||||
php: 5.3
|
||||
phpunit: 4.8.36
|
||||
|
||||
name: S${{ matrix.symfony }} - P${{ matrix.php }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.composer/cache/files
|
||||
key: dependencies-symfony-${{ matrix.symfony }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
|
||||
coverage: none
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
composer require "symfony/symfony:${{ matrix.symfony }}" "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update
|
||||
composer config extra.symfony.require "${{ matrix.symfony }}"
|
||||
composer update --prefer-dist --no-interaction --no-suggest
|
||||
|
||||
- name: Execute tests
|
||||
run: vendor/bin/phpunit --configuration=phpunit-symfony.xml
|
||||
Reference in New Issue
Block a user