Symfony 7.3 and PHP 8.4 #528
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: root | |
| jobs: | |
| test-composer-install: | |
| runs-on: ubuntu-latest | |
| name: Composer install | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # https://taskfile.dev/installation/#github-actions | |
| - name: Install Task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| version: 3.x | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Start docker compose setup | |
| run: | | |
| docker network create frontend | |
| task compose -- up --detach | |
| - name: Validate composer files | |
| run: | | |
| task composer -- validate composer.json --strict | |
| - name: Composer install with exported .env variables | |
| run: | | |
| docker compose --env-file .env exec --env APP_ENV=prod phpfpm composer install --no-dev --optimize-autoloader | |
| test-suite: | |
| name: Test suite | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| version: 3.x | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Start docker compose setup | |
| run: | | |
| docker network create frontend | |
| task compose -- up --detach | |
| - name: Install Dependencies | |
| run: | | |
| task composer -- install | |
| - name: Test suite | |
| run: | | |
| task test | |
| - name: Upload coverage to Codecov test | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./coverage/unit.xml | |
| flags: unittests | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| phpstan: | |
| name: PHPStan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| version: 3.x | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Start docker compose setup | |
| run: | | |
| docker network create frontend | |
| task compose -- up --detach | |
| - name: Install Dependencies | |
| run: | | |
| task composer -- install | |
| - name: Run PHPStan | |
| run: | | |
| task code-analysis:phpstan | |
| validate-doctrine-schema: | |
| runs-on: ubuntu-latest | |
| name: Validate Doctrine Schema | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| version: 3.x | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| # https://github.com/mxschmitt/action-tmate?tab=readme-ov-file#manually-triggered-debug | |
| # Enable tmate debugging if debug logging is enabled (cf. | |
| # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context) | |
| - name: Setup tmate session | |
| uses: mxschmitt/action-tmate@v3 | |
| with: | |
| limit-access-to-actor: false | |
| if: 1 == runner.debug | |
| # @TODO Fix this for real | |
| - name: Allow Elastic search service to read and write in its data directory | |
| run: | | |
| mkdir -p .docker/data/elasticsearch/ | |
| chmod a+w .docker/data/elasticsearch/ | |
| - name: Install site | |
| run: | | |
| docker network create frontend | |
| task compose -- up --detach | |
| task composer -- install | |
| task console -- doctrine:migrations:migrate --no-interaction | |
| - name: Validate Doctrine schema | |
| run: | | |
| task console -- doctrine:schema:validate |