Run tests on different Doctrine versions #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Tests" | |
on: | |
pull_request: | |
push: | |
branches: | |
- "main" | |
jobs: | |
phpunit: | |
name: "PHPUnit" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- php-version: '8.0' | |
dbal-version: '^3.8' | |
orm-version: '^2.7' | |
- php-version: '8.2' | |
dbal-version: '^4.0' | |
orm-version: '^3.1' | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v3 | |
- name: "Setup env & install dependencies" | |
uses: ./.github/actions/install | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: "Run tests with phpunit/phpunit" | |
run: vendor/bin/phpunit | |
phpstan: | |
name: "PhpStan" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v3 | |
- name: "Setup env & install dependencies" | |
uses: ./.github/actions/install | |
with: | |
php-version: '8.2' | |
dbal-version: '^4.0' | |
orm-version: '^3.1' | |
- name: "Run static analyzis with phpstan/phpstan" | |
run: vendor/bin/phpstan analyze | |
checkstyke: | |
name: "Checkstyle" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v3 | |
- name: "Setup env & install dependencies" | |
uses: ./.github/actions/install | |
with: | |
php-version: '8.2' | |
dbal-version: '^4.0' | |
orm-version: '^3.1' | |
- name: "Run checkstyle with squizlabs/php_codesniffer" | |
run: vendor/bin/phpcs | |
codecov: | |
name: "Code coverage" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v3 | |
- name: "Setup env & install dependencies" | |
uses: ./.github/actions/install | |
with: | |
php-version: '8.2' | |
dbal-version: '^4.0' | |
orm-version: '^3.1' | |
- name: "Run tests with phpunit/phpunit" | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
run: | | |
vendor/bin/phpunit --coverage-clover coverage.xml | |
- name: "Upload coverage to Codecov" | |
uses: codecov/codecov-action@v1 |