Skip to content

fix QA action: deployment with a matrix strategy #3

fix QA action: deployment with a matrix strategy

fix QA action: deployment with a matrix strategy #3

name: Quality Assurance

Check failure on line 1 in .github/workflows/quality-assurance.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/quality-assurance.yml

Invalid workflow file

(Line: 35, Col: 13): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.php, (Line: 41, Col: 13): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.php
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
jobs:
unit-tests:
name: PHPUnit tests + cov. (on PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.2', '8.3', '8.4', '8.5' ]
environment:
name: github-pages
url: '${{ steps.deployment.outputs.page_url }}/coverage/php-${{ matrix.php }}'
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Set up PHP (${{ matrix.php }})'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- run: ./composer.phar install -n --no-progress -o
- run: ./composer.phar test+coverage
- name: 'Setup Pages'
uses: actions/configure-pages@v5
- name: 'Upload results (${{ matrix.php }})'
id: deployment-${{ matrix.php }}
uses: actions/upload-pages-artifact@v3
with:
path: 'tests-output/coverage'
name: coverage-${{ matrix.php }}
- name: 'Deploy to GitHub pages (${{ matrix.php }})'
id: deployment-${{ matrix.php }}
uses: actions/deploy-pages@v4
with:
artifact_name: coverage-${{ matrix.php }}
static-analysis:
name: PHPStan checks (on PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.2', '8.3', '8.4', '8.5' ]
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Set up PHP (${{ matrix.php }})'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- run: ./composer.phar install -n --no-progress -o
- run: ./composer.phar stan
- run: ./composer.phar stan-tests