Skip to content

Bikeshedding (#33) #123

Bikeshedding (#33)

Bikeshedding (#33) #123

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 -- ${COVERAGE} --ci
env:
COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-unit.xml' || '' }}
- run: composer pest:feature -- ${COVERAGE} --ci
env:
COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-feature.xml' || '' }}
- run: composer pest:e2e -- ${COVERAGE} --ci
env:
COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-e2e.xml' || '' }}
- uses: actions/upload-artifact@v4
if: ${{ matrix.coverage == 'xdebug' }}
with:
name: coverage
path: coverage-*.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
- uses: codecov/codecov-action@v5
with:
use_oidc: true
fail_ci_if_error: true
disable_search: true
files: coverage-feature.xml
flags: feature
- uses: codecov/codecov-action@v5
with:
use_oidc: true
fail_ci_if_error: true
disable_search: true
files: coverage-e2e.xml
flags: e2e
wait-for-all-tests:
needs:
- pest
runs-on: ubuntu-latest
steps:
- run: exit 0