mirror of
https://github.com/KnpLabs/KnpMarkdownBundle.git
synced 2024-06-02 05:52:14 +02:00
add phpunit matrix
This commit is contained in:
parent
88932cc74d
commit
6decbb73f9
90
.github/workflows/phpunit.yaml
vendored
Normal file
90
.github/workflows/phpunit.yaml
vendored
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
name: PHPUnit
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
phpunit:
|
||||||
|
name: "phpunit - php ${{ matrix.php-version }}"
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
continue-on-error: false
|
||||||
|
env:
|
||||||
|
SYMFONY_REQUIRE: ${{matrix.symfony-require}}
|
||||||
|
SYMFONY_DEPRECATIONS_HELPER: ${{matrix.symfony-deprecations-helper}}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php-version:
|
||||||
|
- "7.4"
|
||||||
|
- "8.0"
|
||||||
|
- "8.1"
|
||||||
|
deps:
|
||||||
|
- "normal"
|
||||||
|
symfony-require:
|
||||||
|
- ""
|
||||||
|
symfony-deprecations-helper:
|
||||||
|
- ""
|
||||||
|
include:
|
||||||
|
|
||||||
|
# Test against stable Symfony 5.3
|
||||||
|
- symfony-require: "5.3.*"
|
||||||
|
php-version: "7.4"
|
||||||
|
deps: "normal"
|
||||||
|
|
||||||
|
- symfony-require: "5.4.*"
|
||||||
|
php-version: "7.4"
|
||||||
|
deps: "normal"
|
||||||
|
|
||||||
|
- symfony-require: "5.4.*"
|
||||||
|
php-version: "8.0"
|
||||||
|
deps: "normal"
|
||||||
|
|
||||||
|
- symfony-require: "6.0.*"
|
||||||
|
php-version: "8.0"
|
||||||
|
deps: "dev"
|
||||||
|
|
||||||
|
|
||||||
|
fail-fast: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout code'
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: 'Install PHP with extensions'
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
coverage: none
|
||||||
|
php-version: ${{ matrix.php-version }}
|
||||||
|
extensions: mbstring, intl, pdo, pdo_sqlite, sqlite3
|
||||||
|
ini-values: date.timezone=UTC
|
||||||
|
|
||||||
|
- name: 'Install phpunit'
|
||||||
|
run: |
|
||||||
|
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
|
||||||
|
vendor/bin/simple-phpunit install
|
||||||
|
|
||||||
|
- name: "Cache dependencies installed with composer"
|
||||||
|
uses: "actions/cache@v2"
|
||||||
|
with:
|
||||||
|
path: "~/.composer/cache"
|
||||||
|
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
|
||||||
|
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
|
||||||
|
|
||||||
|
- name: "Install stable dependencies with composer"
|
||||||
|
run: "composer update --no-interaction --prefer-dist --prefer-stable"
|
||||||
|
if: "${{ matrix.deps == 'normal' }}"
|
||||||
|
|
||||||
|
- name: "Install dev dependencies with composer"
|
||||||
|
run: "composer update --no-interaction --prefer-dist"
|
||||||
|
if: "${{ matrix.deps == 'dev' }}"
|
||||||
|
|
||||||
|
- name: "Install lowest possible dependencies with composer"
|
||||||
|
run: "composer update --no-interaction --prefer-dist --prefer-stable --prefer-lowest"
|
||||||
|
if: "${{ matrix.deps == 'low' }}"
|
||||||
|
|
||||||
|
- name: "Run PHPUnit"
|
||||||
|
run: "vendor/bin/simple-phpunit install"
|
||||||
|
|
||||||
|
- name: 'Run tests'
|
||||||
|
run: vendor/bin/phpunit -v
|
Loading…
Reference in a new issue