4268: API Platform v4 #70
Workflow file for this run
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
| on: pull_request | |
| name: Review | |
| jobs: | |
| api-test: | |
| name: API test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # https://taskfile.dev/installation/#github-actions | |
| - uses: arduino/setup-task@v2 | |
| - name: Load fixtures | |
| run: | | |
| task --yes fixtures:load | |
| - name: Run API tests | |
| run: | | |
| task --yes api:test | |
| psalm: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ["8.3"] | |
| name: Psalm static analysis (${{ matrix.php}}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP, with composer and extensions | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php}} | |
| extensions: http, ctype, iconv | |
| coverage: none | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.dependency-version }}- | |
| restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}- | |
| - name: Install Dependencies | |
| run: | | |
| composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | |
| bin/console cache:clear | |
| - name: Psalm | |
| run: ./vendor/bin/psalm --no-cache | |
| apispec: | |
| runs-on: ubuntu-latest | |
| name: API Specification validation | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ["8.3"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Setup PHP, with composer and extensions | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php}} | |
| extensions: http, ctype, iconv | |
| coverage: none | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install Dependencies | |
| run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | |
| - name: Export specifications | |
| run: bin/console api:openapi:export --yaml --output=public/spec.yaml --no-interaction | |
| - name: Check for changes in specifications | |
| run: git diff --diff-filter=ACMRT --exit-code public/spec.yaml |