Install vendors in workflows #8
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: 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 pull --include-deps | |
docker compose build | |
docker compose up -d | |
- name: Install vendors | |
shell: bash | |
run: | | |
docker compose exec app composer install -q --no-ansi --no-interaction --no-progress --prefer-dist | |
- name: Install tools | |
shell: bash | |
run: | | |
docker compose exec app composer phive:install --no-interaction --no-progress --ansi | |
- name: PHP-CS-Fixer | |
shell: bash | |
run: | | |
docker compose exec app composer cs:check | |
- name: PHPStan | |
shell: bash | |
run: | | |
docker compose exec app composer phpstan:check | |
- name: Rector | |
shell: bash | |
run: | | |
docker compose exec app composer rector:check | |
- name: Tests | |
shell: bash | |
run: | | |
docker compose exec app composer phpunit:check | |
- name: Stop stack | |
if: always() | |
shell: bash | |
run: | | |
docker compose down |