Add OpenAPI docs (#1) #51
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: Backend | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- backend/** | |
pull_request: | |
paths: | |
- backend/** | |
defaults: | |
run: | |
working-directory: ./backend | |
jobs: | |
composer: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup_php | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
- name: Search for security vulnerabilities | |
run: composer audit | |
- name: Check system requirements | |
run: composer check | |
code_quality: | |
needs: [ 'composer' ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup_php | |
- name: Static analysis | |
run: vendor/bin/phpstan analyze --error-format=github | |
- name: Code style | |
run: vendor/bin/php-cs-fixer fix --dry-run --format=json | |
test: | |
needs: [ 'composer', 'code_quality' ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup_php | |
- name: Test | |
run: vendor/bin/phpunit |