CI #21
Workflow file for this run
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: CI | |
on: [push, pull_request] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Build Docker images | |
uses: docker/bake-action@v4 | |
with: | |
pull: true | |
load: true | |
files: | | |
compose.yaml | |
compose.override.yaml | |
set: | | |
*.cache-from=type=gha,scope=${{github.ref}} | |
*.cache-from=type=gha,scope=refs/heads/main | |
*.cache-to=type=gha,scope=${{github.ref}},mode=max | |
- | |
name: Start services | |
run: docker compose up --wait --no-build | |
env: | |
XDEBUG_MODE: coverage | |
- | |
name: Install Dependencies | |
run: docker compose exec -T php composer install -vvv --no-ansi --no-interaction | |
- | |
name: Check Code Quality via PHP_CodeSniffer | |
run: docker compose exec -T php bin/php_codesniffer | |
- | |
name: Check Code Quality via PHP-CS-Fixer | |
run: docker compose exec -T php bin/php-cs-fixer | |
- | |
name: Rector Cache | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/rector | |
key: ${{ runner.os }}-rector-${{ github.run_id }} | |
restore-keys: ${{ runner.os }}-rector- | |
- | |
run: mkdir -p /tmp/rector | |
- | |
name: Rector Dry Run | |
run: docker compose exec -T php bin/rector | |
- | |
name: Execute tests via PHPUnit | |
run: docker compose exec -T php vendor/bin/phpunit --coverage-clover var/log/coverage-clover.xml | |
- | |
name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
lint: | |
name: Docker Lint | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Lint Dockerfile | |
uses: hadolint/[email protected] |