fix QA action: deployment with a matrix strategy #3
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: Quality Assurance | ||
|
Check failure on line 1 in .github/workflows/quality-assurance.yml
|
||
| 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 | ||