Add servers and sites API endpoints and let users use the API #316
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 | |
| env: | |
| COMPOSE_USER: runner | |
| jobs: | |
| phpstan: | |
| runs-on: ubuntu-latest | |
| name: PHPStan | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Create docker network | |
| run: docker network create frontend | |
| - name: Run PHPStan | |
| run: | | |
| docker compose run --rm phpfpm composer install --no-interaction | |
| docker compose run --rm phpfpm vendor/bin/phpstan analyse | |
| phpunit: | |
| runs-on: ubuntu-latest | |
| name: PHP Unit tests | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Create docker network | |
| run: docker network create frontend | |
| - name: Run tests with coverage | |
| run: | | |
| docker compose up --detach | |
| docker compose exec -e XDEBUG_MODE=coverage phpfpm composer install --no-interaction | |
| docker compose exec -e XDEBUG_MODE=coverage phpfpm bin/console --env=test doctrine:database:drop --if-exists --force --quiet | |
| docker compose exec -e XDEBUG_MODE=coverage phpfpm bin/console --env=test doctrine:database:create --no-interaction --if-not-exists --quiet | |
| docker compose exec -e XDEBUG_MODE=coverage phpfpm bin/console --env=test doctrine:migrations:migrate --no-interaction --quiet | |
| docker compose exec -e XDEBUG_MODE=coverage phpfpm vendor/bin/phpunit --coverage-clover=coverage/unit.xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage/unit.xml | |
| fail_ci_if_error: true | |
| flags: unittests | |
| build-assets: | |
| runs-on: ubuntu-latest | |
| name: Build assets | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Create docker network | |
| run: docker network create frontend | |
| - name: Build assets | |
| run: | | |
| docker compose run --rm node yarn install | |
| docker compose run --rm node yarn build |