Skip to content

✨ [GEST-1928] Rodando em self-hosted runner #17

✨ [GEST-1928] Rodando em self-hosted runner

✨ [GEST-1928] Rodando em self-hosted runner #17

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
PHP: [56, 73, 74, 80, 81]
runs-on: php-ci
steps:
- uses: actions/checkout@v2
- name: Prepare code
env:
PHP_VERSION: ${{ matrix.PHP }}
run: |
touch .env
echo "GITHUB_TOKEN=${{ secrets.GH_TOKEN }}" >> .env
echo "PHP_VERSION=$PHP_VERSION" >> .env
- name: Up environment
run: |
docker compose up -d
- name: Wait environment
run: |
echo $(docker compose -f docker-compose.wait.yml run --rm wait)
- name: Environment logs
run: |
docker compose ps
docker compose logs php
- name: Install PHP Stan
if: matrix.PHP != '56'
run: |
docker compose exec -T php composer require phpstan/phpstan --dev
- name: Run PHP Unit
run: |
docker compose exec -T php composer test
- name: Run PHP Stan
if: matrix.PHP != '56'
run: |
docker compose exec -T php composer analyse
- name: Run PHP CS Fixer
if: matrix.PHP != '56'
run: |
docker compose exec -T php composer fix:ci
- name: Desligando ambiente
if: ${{ always() }}
run: |
docker compose exec -T php rm -Rf vendor/ .env
docker compose down --remove-orphans