Skip to content

Commit

Permalink
[WIP] compute
Browse files Browse the repository at this point in the history
  • Loading branch information
IchHabRecht committed Aug 3, 2024
1 parent 461191f commit 40b94ce
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,36 @@ name: 🏃 tests

on: [ push, pull_request, workflow_call ]

env:
OS: '[ "ubuntu-latest" ]'
PHP: '[ "8.0", "8.1", "8.2", "8.3" ]'

jobs:
test:
name: 'COVERAGE: ${{ matrix.coverage }} - PHP: ${{ matrix.php }}'
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: [ 'ubuntu-latest' ]
os: ${{ fromJson(needs.compute.outputs.os) }}
coverage: [ '~9.0.0', '~9.1.0', '~9.2.0', '~10.0.0', '~10.1.0' ]
php: [ '8.0', '8.1', '8.2', '8.3' ]
exclude:
- coverage: '~10.0.0'
php: '8.0'
- coverage: '~10.1.0'
php: '8.0'
php: ${{ fromJson(needs.compute.outputs.php) }}

runs-on: ${{ matrix.os }}

Expand All @@ -32,10 +47,10 @@ jobs:
id: restore-composer-cache
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.coverage }}-${{ matrix.php }}
key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.coverage }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.coverage }}-
${{ runner.os }}-composer-
${{ runner.os }}-${{ matrix.php }}-
${{ runner.os }}-
- name: Set up PHP Version ${{ matrix.php }}
uses: shivammathur/setup-php@v2
Expand Down

0 comments on commit 40b94ce

Please sign in to comment.