Chore: Fix broken links. Old DBAL docs are no longer available, use 3.0. #177
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: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allow job to be triggered manually. | |
workflow_dispatch: | |
# Cancel in-progress jobs when pushing to the same branch. | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ 'ubuntu-latest' ] #, macos-latest, windows-latest ] | |
php-version: [ '8.0', '8.1', '8.2', '8.3' ] | |
# https://docs.github.com/en/free-pro-team@latest/actions/guides/about-service-containers | |
services: | |
cratedb: | |
image: crate/crate:nightly | |
ports: | |
- 4200:4200 | |
# https://github.com/marketplace/actions/setup-php-action | |
name: PHP ${{ matrix.php-version }} on OS ${{ matrix.os }} | |
steps: | |
- name: Acquire sources | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
# Select PHPUnit version suitable for PHP 7.2. | |
tools: composer, phpunit:^8.5 | |
- uses: ramsey/composer-install@v2 | |
# Remark: --prefer-source is needed for "Doctrine\Tests\DBAL\Platforms\AbstractPlatformTestCase" | |
- name: Install doctrine/dbal from source | |
run: | | |
rm -rf vendor/doctrine/dbal | |
composer update doctrine/dbal --prefer-source | |
- name: Run code style checks | |
run: composer run check-style | |
- name: Run tests | |
run: composer run test | |
# https://github.com/codecov/codecov-action | |
- name: Upload coverage results to Codecov | |
uses: codecov/codecov-action@v4 | |
if: always() && (matrix.php-version == '7.4' || startsWith(matrix.php-version, '8.')) | |
with: | |
files: ./build/logs/clover.xml | |
fail_ci_if_error: false | |
- name: Upload coverage results to Scrutinizer CI | |
if: always() && (matrix.php-version == '7.4' || startsWith(matrix.php-version, '8.')) | |
run: | | |
composer global require scrutinizer/ocular | |
ocular code-coverage:upload --format=php-clover build/logs/clover.xml |