KnpMarkdownBundle/.github/workflows/code_checks.yml
2021-10-02 22:13:57 +02:00

40 lines
1 KiB
YAML

# .github/workflows/code_checks.yaml
name: Code_Checks
on: ["push", "pull_request"]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1']
stability: [ prefer-lowest, prefer-stable ]
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} tests
steps:
# basically git clone
- uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
# use PHP of specific version
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pcov
coverage: pcov
- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
env:
SYMFONY_DEPRECATIONS_HELPER: 'weak'
run: vendor/bin/phpunit -v