merge coverage reports. #249
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ feature/*, develop, dev-*, master ] | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: [ feature/*, develop, dev-*, master ] | |
| jobs: | |
| test-mysql: | |
| name: Laravel ${{ matrix.laravel }} / PHP ${{ matrix.php }} / MySQL ${{ matrix.mysql }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| laravel: [ 10, 11, 12 ] | |
| php: [ 8.2, 8.3, 8.4 ] | |
| mysql: [ 5.7, 8.0 ] | |
| exclude: | |
| - laravel: 10 | |
| php: 8.4 | |
| mysql: 5.7 | |
| - laravel: 10 | |
| php: 8.4 | |
| mysql: 8.0 | |
| services: | |
| mysql: | |
| image: mysql:${{ matrix.mysql }} | |
| ports: | |
| - 3306:3306 | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' | |
| MYSQL_DATABASE: testing | |
| options: >- | |
| --health-cmd="mysqladmin ping --silent" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=3 | |
| env: | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: 3306 | |
| DB_USERNAME: root | |
| DB_PASSWORD: '' | |
| DB_DATABASE: testing | |
| DB_CONNECTION: 'mysql' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring, pdo_mysql, zip, exif, intl, gd, bcmath, curl, dom, xdebug | |
| coverage: xdebug | |
| - name: Run PHPUnit | |
| run: vendor/bin/phpunit --coverage-php=coverage/coverage.cov | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-mysql-${{ matrix.laravel }}-${{ matrix.php }}-${{ matrix.mysql }} | |
| path: coverage/coverage.cov | |
| test-pgsql: | |
| name: Laravel ${{ matrix.laravel }} / PHP ${{ matrix.php }} / PostgreSQL 15 | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| strategy: | |
| matrix: | |
| laravel: [ 10, 11, 12 ] | |
| php: [ 8.2, 8.3, 8.4 ] | |
| exclude: | |
| - laravel: 10 | |
| php: 8.4 | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_DB: testing | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: '' | |
| POSTGRES_HOST_AUTH_METHOD: trust | |
| options: >- | |
| --health-cmd="pg_isready -U postgres" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=3 | |
| env: | |
| DB_HOST: 127.0.0.1 | |
| DB_USERNAME: postgres | |
| DB_PASSWORD: '' | |
| DB_DATABASE: testing | |
| DB_CONNECTION: 'pgsql' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring, pdo_pgsql, zip, exif, intl, gd, bcmath, curl, dom, xdebug | |
| coverage: xdebug | |
| - name: Run PHPUnit | |
| run: vendor/bin/phpunit --coverage-php=coverage/coverage.cov | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-pgsql-${{ matrix.laravel }}-${{ matrix.php }} | |
| path: coverage/coverage.cov | |
| test-sqlsrv: | |
| name: Laravel ${{ matrix.laravel }} / PHP ${{ matrix.php }} / MSSQL | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| strategy: | |
| matrix: | |
| laravel: [ 12 ] | |
| php: [ 8.4 ] | |
| services: | |
| mssql: | |
| image: mcr.microsoft.com/mssql/server:2022-latest | |
| ports: | |
| - 1433:1433 | |
| env: | |
| ACCEPT_EULA: Y | |
| SA_PASSWORD: Passw0rd1234! | |
| MSSQL_PID: Express | |
| options: >- | |
| --health-cmd="exit 0" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=3 | |
| env: | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: 1433 | |
| DB_USERNAME: SA | |
| DB_PASSWORD: Passw0rd1234! | |
| DB_DATABASE: testing | |
| DB_CONNECTION: 'sqlsrv' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install ODBC Drivers | |
| run: | | |
| curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
| curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list | |
| sudo apt-get update | |
| sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools | |
| sudo apt-get install -y unixodbc-dev | |
| - name: Set up PHP with SQLSRV | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring, pdo_sqlsrv, sqlsrv, zip, exif, intl, gd, bcmath, curl, dom, xdebug | |
| coverage: xdebug | |
| - name: Run PHPUnit | |
| run: vendor/bin/phpunit --coverage-php=coverage/coverage.cov | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-sqlsrv-${{ matrix.laravel }}-${{ matrix.php }} | |
| path: coverage/coverage.cov | |
| merge-coverage: | |
| name: Merge Coverage Reports | |
| runs-on: ubuntu-latest | |
| needs: [ test-mysql, test-pgsql, test-sqlsrv ] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: all-coverage | |
| - name: Install phpcov | |
| run: composer global require phpunit/phpcov | |
| - name: Merge coverage | |
| run: | | |
| mkdir -p coverage | |
| phpcov merge --clover coverage/clover.xml all-coverage/ | |
| - name: Upload merged coverage to qltysh | |
| uses: qltysh/qlty-action/coverage@v1 | |
| with: | |
| token: ${{ secrets.QLTY_COVERAGE_TOKEN }} | |
| files: coverage/clover.xml |