diff --git a/.github/workflows/run-coverage.yml b/.github/workflows/run-coverage.yml new file mode 100644 index 0000000..f444f13 --- /dev/null +++ b/.github/workflows/run-coverage.yml @@ -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 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 80d02e8..b0bd0fc 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -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: | @@ -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