Files
2025-10-12 13:56:29 +02:00

47 lines
1.1 KiB
YAML

name: Backend Tests
on:
push:
paths:
- "server/**"
- ".github/workflows/backend-tests.yml"
pull_request:
paths:
- "server/**"
- ".github/workflows/backend-tests.yml"
jobs:
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
defaults:
run:
working-directory: server
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.4"
coverage: none
tools: composer
extensions: mbstring
ini-values: memory_limit=-1
cache: composer
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Set up database
run: |
APP_ENV=test php bin/console doctrine:database:create --env=test
APP_ENV=test php bin/console doctrine:migrations:migrate --no-interaction --env=test
APP_ENV=test php bin/console doctrine:fixtures:load --no-interaction --env=test
- name: Run PHPUnit
run: vendor/bin/phpunit