mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
53 lines
1.8 KiB
YAML
53 lines
1.8 KiB
YAML
name: Running tests
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
schedule:
|
|
- cron: '0 * * * *'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
php: [ 8.0, 7.4, 7.3, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4 ]
|
|
dependency-version: [ prefer-lowest, prefer-stable ]
|
|
|
|
name: php ${{ matrix.php }} - ${{ matrix.dependency-version }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Cache dependencies
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.composer/cache/files
|
|
key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php }}
|
|
coverage: none
|
|
|
|
- name: Require phpunit 5.7 for php >= 5.6
|
|
if: matrix.php >= 5.6
|
|
run: COMPOSER_MEMORY_LIMIT=-1 composer require "phpunit/phpunit:6.*" --no-interaction --no-update
|
|
|
|
- name: Require phpunit 6 for php >= 7.0
|
|
if: matrix.php >= 7.0
|
|
run: COMPOSER_MEMORY_LIMIT=-1 composer require "phpunit/phpunit:6.*" --no-interaction --no-update
|
|
|
|
- name: Require phpunit 9 for php >= 7.3
|
|
if: matrix.php >= 7.3
|
|
run: COMPOSER_MEMORY_LIMIT=-1 composer require "phpunit/phpunit:9.*" --no-interaction --no-update
|
|
|
|
- name: Install dependencies
|
|
run: COMPOSER_MEMORY_LIMIT=-1 composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
|
|
|
|
- name: Execute tests
|
|
run: vendor/bin/phpunit
|