mirror of
https://github.com/KnpLabs/KnpMarkdownBundle.git
synced 2024-05-16 20:36:42 +02:00
Remove PHP config and simplify PHPUnit one
This commit is contained in:
parent
7dd53fca23
commit
80e724bb6c
36
.github/workflows/php.yml
vendored
36
.github/workflows/php.yml
vendored
|
@ -1,36 +0,0 @@
|
||||||
name: PHP Composer
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
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: SYMFONY_DEPRECATIONS_HELPER=5 composer run-script test
|
|
37
.github/workflows/phpunit.yaml
vendored
37
.github/workflows/phpunit.yaml
vendored
|
@ -49,10 +49,10 @@ jobs:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout code"
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: "Install PHP with extensions"
|
- name: Install PHP with extensions
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
coverage: none
|
coverage: none
|
||||||
|
@ -60,30 +60,33 @@ jobs:
|
||||||
extensions: mbstring, intl, pdo, pdo_sqlite, sqlite3
|
extensions: mbstring, intl, pdo, pdo_sqlite, sqlite3
|
||||||
ini-values: date.timezone=UTC
|
ini-values: date.timezone=UTC
|
||||||
|
|
||||||
- name: "Install dependencies with Composer"
|
- name: Validate composer.json and composer.lock
|
||||||
run: "composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable"
|
run: composer validate --strict
|
||||||
|
|
||||||
- name: "Cache dependencies installed with Composer"
|
- name: Install dependencies with Composer
|
||||||
uses: "actions/cache@v2"
|
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
|
||||||
|
|
||||||
|
- name: Cache dependencies installed with Composer
|
||||||
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: "~/.composer/cache"
|
path: ~/.composer/cache
|
||||||
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
|
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
|
||||||
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
|
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
|
||||||
|
|
||||||
- name: "Install stable dependencies with Composer"
|
- name: Install stable dependencies with Composer
|
||||||
run: "composer update --no-interaction --prefer-dist --prefer-stable"
|
run: composer update --no-interaction --prefer-dist --prefer-stable
|
||||||
if: "${{ matrix.deps == 'stable' }}"
|
if: "${{ matrix.deps == 'stable' }}"
|
||||||
|
|
||||||
- name: "Install dev dependencies with Composer"
|
- name: Install dev dependencies with Composer
|
||||||
run: "composer update --no-interaction --prefer-dist"
|
run: composer update --no-interaction --prefer-dist
|
||||||
if: "${{ matrix.deps == 'dev' }}"
|
if: "${{ matrix.deps == 'dev' }}"
|
||||||
|
|
||||||
- name: "Install lowest possible dependencies with Composer"
|
- name: Install lowest possible dependencies with Composer
|
||||||
run: "composer update --no-interaction --prefer-dist --prefer-stable --prefer-lowest"
|
run: composer update --no-interaction --prefer-dist --prefer-stable --prefer-lowest
|
||||||
if: "${{ matrix.deps == 'low' }}"
|
if: "${{ matrix.deps == 'low' }}"
|
||||||
|
|
||||||
- name: "Install PHPUnit"
|
- name: Install PHPUnit
|
||||||
run: "composer run-script test install"
|
run: composer run-script test install
|
||||||
|
|
||||||
- name: "Run tests"
|
- name: Run tests
|
||||||
run: "composer run-script test -v"
|
run: composer run-script test -v
|
||||||
|
|
Loading…
Reference in a new issue