Skip to content

Use Test environment for tests #13

Use Test environment for tests

Use Test environment for tests #13

Workflow file for this run

name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Start stack
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml pull --include-deps
docker compose -f compose.yaml -f compose.tests.yaml build
docker compose -f compose.yaml -f compose.tests.yaml up -d
- name: Install vendors
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml exec app composer install --no-ansi --no-interaction --no-progress --prefer-dist
- name: Install tools
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml exec app composer phive:install --no-interaction --no-progress --ansi
- name: PHP-CS-Fixer
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml exec app composer cs:check
- name: PHPStan
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml exec app composer phpstan:check
- name: Rector
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml exec app composer rector:check
- name: Tests
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml exec app composer phpunit:check
- name: Stop stack
if: always()
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml down