Add 403UserCentricPreparator to handle random parameters that generates a 403 error because the user is not allowed to browse them #327
This file contains 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: Code Analysis | |
on: | |
pull_request: ~ | |
push: | |
branches: | |
- main | |
jobs: | |
code-validation: | |
name: ${{ matrix.actions.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
actions: | |
- name: Composer validate | |
run: composer validate --ansi --strict | |
- name: PHPStan | |
run: composer phpstan | |
- name: Ecs | |
run: composer check-cs | |
- name: PHPUnit | |
run: composer unit | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
coverage: pcov | |
tools: composer:v2 | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
uses: "ramsey/composer-install@v2" | |
- run: ${{ matrix.actions.run }} | |
- name: Coverage diff | |
uses: OpenClassrooms/[email protected] | |
if: ${{ hashFiles('build/coverage/coverage.xml') != '' && github.event_name == 'pull_request' }} | |
with: | |
action: check | |
files: '[{"coverage": "build/coverage/coverage.xml", "summary": "coverage-summary.json", "label": "Coverage", "badge": "coverage.svg"}]' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Coverage update | |
uses: OpenClassrooms/[email protected] | |
if: ${{ hashFiles('build/coverage/coverage.xml') != '' && github.event_name == 'push' && github.ref_name == 'main' }} | |
with: | |
action: update | |
files: '[{"coverage": "build/coverage/coverage.xml", "summary": "coverage-summary.json", "label": "Coverage", "badge": "coverage.svg"}]' | |
token: ${{ secrets.GITHUB_TOKEN }} |