Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/run-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: run-coverage

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: coverage-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
coverage:
runs-on: ubuntu-latest
timeout-minutes: 15
name: Code coverage · PHP 8.4 · Laravel 13

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: pcov
tools: composer:v2

- name: Install dependencies
env:
COMPOSER_PROCESS_TIMEOUT: 0
run: bash .github/scripts/install-test-dependencies.sh "13.*" "prefer-stable"

- name: Run tests with coverage
run: |
mkdir -p build/logs
vendor/bin/pest --ci --coverage --min=96 --coverage-clover=build/logs/clover.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/logs/clover.xml
fail_ci_if_error: false
13 changes: 3 additions & 10 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, pcov
coverage: pcov
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none

- name: Setup problem matchers
run: |
Expand All @@ -58,14 +58,7 @@ jobs:
run: vendor/bin/pint --test

- name: Execute tests
run: vendor/bin/pest --ci --coverage --min=96

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.php == '8.4' && matrix.laravel == '13.*' && matrix.stability == 'prefer-stable'
uses: codecov/codecov-action@v5
with:
files: build/logs/clover.xml
fail_ci_if_error: false
run: vendor/bin/pest --ci --no-coverage

platform-smoke:
runs-on: ubuntu-latest
Expand Down
Loading