name: Test

on:
  pull_request:
    branches: ["main"]
  push:
    branches: ["main"]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        php_version:
          - 7.4
          - 8.0
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Prepare
        run: |
          echo UID=`id -u` >> $GITHUB_ENV
          echo GID=`id -g` >> $GITHUB_ENV

      - name: Build
        run: docker-compose build
        env:
          PHP_VERSION: ${{ matrix.php_version }}

      - name: Install
        run: docker-compose run romans composer install

      - name: Test
        run: docker-compose run romans composer test

      - name: Clean
        run: docker-compose down
        if: ${{ always() }}

name: Test

on:
  pull_request:
    branches: ["main"]
  push:
    branches: ["main"]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        php_version:
          - 7.4
          - 8.0
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Prepare
        run: |
          echo UID=`id -u` >> $GITHUB_ENV
          echo GID=`id -g` >> $GITHUB_ENV

      - name: Build
        run: docker-compose build
        env:
          PHP_VERSION: ${{ matrix.php_version }}

      - name: Install
        run: docker-compose run romans composer install

      - name: Test
        run: docker-compose run romans -e COVERAGE_OPTIONS composer test
        env:
          COVERAGE_OPTIONS: --coverage-text

      - name: Clean
        run: docker-compose down
        if: ${{ always() }}

Add coverage on GitHub Actions
Add coverage on GitHub Actions
