Skip to content

GitHub Actions: Update typisttech/.github to v3 (#27) #109

GitHub Actions: Update typisttech/.github to v3 (#27)

GitHub Actions: Update typisttech/.github to v3 (#27) #109

Workflow file for this run

name: Test
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: {}
jobs:
php-matrix:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.php-matrix.outputs.versions }}
highest: ${{ steps.php-matrix.outputs.highest }}
steps:
- uses: actions/checkout@v5
with:
sparse-checkout: composer.json
sparse-checkout-cone-mode: false
- uses: typisttech/php-matrix-action@v2
id: php-matrix
pest:
needs: php-matrix
strategy:
matrix:
php-version: ${{ fromJSON(needs.php-matrix.outputs.versions) }}
coverage: ['none']
exclude:
- php-version: ${{ needs.php-matrix.outputs.highest }}
coverage: 'none'
include:
- php-version: ${{ needs.php-matrix.outputs.highest }}
coverage: xdebug
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: ${{ matrix.coverage }}
- uses: ramsey/composer-install@v3
with:
dependency-versions: highest
- run: composer pest:unit -- --ci --coverage-clover coverage-unit.xml
if: ${{ matrix.coverage == 'xdebug' }}
- run: composer pest:unit -- --ci
if: ${{ matrix.coverage != 'xdebug' }}
- run: composer pest:feature -- --ci
- run: composer pest:e2e -- --ci
- uses: actions/upload-artifact@v4
if: ${{ matrix.coverage == 'xdebug' }}
with:
name: coverage
path: coverage-unit.xml
codecov:
needs: pest
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v5
- uses: actions/download-artifact@v5
with:
name: coverage
- uses: codecov/codecov-action@v5
with:
use_oidc: true
fail_ci_if_error: true
disable_search: true
files: coverage-unit.xml
flags: unit