mirror of
https://github.com/code-rhapsodie/ezdataflow-bundle.git
synced 2026-03-24 14:42:06 +01:00
56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
name: PHP Composer
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php-version: [7.4, 8.0, 8.1, 8.2]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup PHP ${{ matrix.php-version }}
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php-version }}
|
|
extensions: xdebug
|
|
- name: PHP Version
|
|
run: php -v
|
|
|
|
- name: PHP Lint
|
|
run: find . -type f -name '*.php' -exec php -l {} \; | (! grep -v "No syntax errors detected" )
|
|
|
|
- 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${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-php${{ matrix.php-version }}-
|
|
|
|
- name: Install dependencies
|
|
run: composer update --prefer-dist --no-progress --no-scripts
|
|
|
|
- name: PHPUnit
|
|
run: php -d xdebug.mode=coverage vendor/bin/phpunit --log-junit junit.xml
|
|
|
|
- name: Publish Unit Test Results
|
|
uses: EnricoMi/publish-unit-test-result-action@v1
|
|
if: always()
|
|
with:
|
|
files: junit.xml
|