Convert to constraint sub command; Extract ModeOption & SourceOption attributes; Update pestphp/pest to v4.1
#93
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: | |
| pest: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - dependency-versions: lowest | |
| coverage: none | |
| - dependency-versions: highest | |
| coverage: xdebug | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| coverage: ${{ matrix.coverage }} | |
| - uses: ramsey/composer-install@v3 | |
| with: | |
| dependency-versions: ${{ matrix.dependency-versions }} | |
| composer-options: --no-audit --optimize-autoloader | |
| - run: composer pest:unit -- ${COVERAGE} --ci --bail --stop-on-incomplete --fail-on-all-issues | |
| env: | |
| COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-unit.xml' || '' }} | |
| - run: composer pest:feature -- ${COVERAGE} --ci --bail --stop-on-incomplete --fail-on-all-issues | |
| env: | |
| COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-feature.xml' || '' }} | |
| - uses: actions/upload-artifact@v4 | |
| if: matrix.coverage == 'xdebug' | |
| with: | |
| name: coverage | |
| path: | | |
| coverage-unit.xml | |
| coverage-feature.xml | |
| e2e: | |
| needs: pest | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| dependency-versions: [lowest, highest] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| coverage: none | |
| - uses: ramsey/composer-install@v3 | |
| with: | |
| dependency-versions: ${{ matrix.dependency-versions }} | |
| composer-options: --no-audit --optimize-autoloader | |
| - run: composer pest:e2e -- --ci --bail --stop-on-incomplete --fail-on-all-issues | |
| 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: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }} | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| disable_search: true | |
| files: coverage-unit.xml | |
| flags: unit | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }} | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| disable_search: true | |
| files: coverage-feature.xml | |
| flags: feature |