Skip to content

4268: API Platform v4 #72

4268: API Platform v4

4268: API Platform v4 #72

Workflow file for this run

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: Start docker compose setup
run: |
docker network create frontend
task compose -- pull
task compose -- up --detach
- name: Load fixtures
run: |
task --yes fixtures:load
- name: Run API tests
run: |
task --yes api:test
coding-standards-yaml:
name: Coding standards YAML
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# https://taskfile.dev/installation/#github-actions
- uses: arduino/setup-task@v2
- name: Start docker compose setup
run: |
docker network create frontend
- name: Load fixtures
run: |
task --yes coding-standards:yaml:check
- name: Check that nothing has changed
run: git diff --exit-code
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