Skip to content

[WIP] compute

[WIP] compute #5

Workflow file for this run

name: 🏃 tests
on: [ push, pull_request, workflow_call ]
env:
OS: '[ \"ubuntu-latest\" ]'
PHP: '[ \"8.0\" \"8.1\" \"8.2\" \"8.3\" ]'
jobs:
compute:
name: Compute outputs
runs-on: ubuntu-latest
outputs:
os: ${{ env.OS }}
php: ${{ env.PHP }}
steps:
- name: Pseudo step
if: false
run: echo
build:
name: 'Build COVERAGE: ${{ matrix.coverage }} - PHP: ${{ matrix.php }}'
needs: [ compute ]
strategy:
fail-fast: false
matrix:
os: ${{ needs.compute.outputs.os }}
coverage: [ '~9.0.0', '~9.1.0', '~9.2.0', '~10.0.0', '~10.1.0' ]
php: ${{ needs.compute.outputs.php }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Store Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache/restore@v4
id: restore-composer-cache
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.coverage }}
restore-keys: |
${{ runner.os }}-${{ matrix.php }}-
${{ runner.os }}-
- name: Set up PHP Version ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
tools: composer:v2
- name: Environment Check
run: |
php --version
composer --version
mkdir -p .Log/coverage/ .Log/junit/
- name: Validate composer.json
run: composer validate
- name: Composer install
run: composer update --with "phpunit/php-code-coverage:${{ matrix.coverage }}" --no-interaction
- name: Save composer cache
uses: actions/cache/save@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ steps.restore-composer-cache.outputs.cache-primary-key }}
- name: Lint PHP
run: php .Build/bin/parallel-lint --exclude .Build .