Skip to content

Commit

Permalink
wip dorp me
Browse files Browse the repository at this point in the history
  • Loading branch information
tangrufus committed Jan 2, 2025
1 parent 288927c commit 54372ae
Showing 1 changed file with 4 additions and 45 deletions.
49 changes: 4 additions & 45 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,13 @@
name: Test

on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main

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
permissions:
contents: read
outputs:
matrix: ${{ steps.php-matrix.outputs.matrix }}
constraint: ${{ fromJSON(steps.php-matrix.outputs.matrix).constraint }}
versions: ${{ toJSON(fromJSON(steps.php-matrix.outputs.matrix).versions) }}
lowest: ${{ fromJSON(steps.php-matrix.outputs.matrix).lowest }}
highest: ${{ fromJSON(steps.php-matrix.outputs.matrix).highest }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -44,11 +26,11 @@ jobs:
dependency-versions: [lowest, highest]
coverage: [none]
exclude:
- php: ${{ needs.php-matrix.outputs.highest }}
- php: ${{ fromJSON(needs.php-matrix.outputs.matrix).highest }}
dependency-versions: highest
coverage: none
include:
- php: ${{ needs.php-matrix.outputs.highest }}
- php: ${{ fromJSON(needs.php-matrix.outputs.matrix).highest }}
dependency-versions: highest
coverage: xdebug
steps:
Expand All @@ -64,32 +46,9 @@ jobs:
- uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependency-versions }}
composer-options: --no-audit --optimize-autoloader

- run: composer pest:unit -- --ci --coverage-clover coverage.xml
- run: composer test:with-coverage
if: ${{ matrix.coverage == 'xdebug' }}

- run: composer pest:unit -- --ci
- run: composer test:without-coverage
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.xml

codecov:
needs: pest
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: coverage
- uses: codecov/codecov-action@v5
with:
use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }}

0 comments on commit 54372ae

Please sign in to comment.