name: tests

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  php:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        php: [7.4, 8.0, 8.1]
        dependency-version: [prefer-lowest, prefer-stable]

    steps:
      - name: checkout code
        uses: actions/checkout@v2

      - name: setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          coverage: xdebug

#      - name: do some magic Composer cache
#        id: composer-cache
#        run: echo "::set-output name=dir::$(composer config cache-files-dir)"
#      - uses: actions/cache@v2
#        with:
#          path: ${{ steps.composer-cache.outputs.dir }}
#          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
#          restore-keys: ${{ runner.os }}-composer-

      - name: install dependencies
        run: composer update --${{ matrix.dependency-version }}

      - name: run tests
        run: php vendor/bin/phpunit --coverage-clover=coverage.clover
#        run: php vendor/bin/phpunit

      - name: upload code coverage
        run: php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover


name: tests

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  php:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        php: [7.4, 8.0, 8.1]
        dependency-version: [prefer-lowest, prefer-stable]

    steps:
      - name: checkout code
        uses: actions/checkout@v2

      - name: setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          coverage: xdebug

#      - name: do some magic Composer cache
#        id: composer-cache
#        run: echo "::set-output name=dir::$(composer config cache-files-dir)"
#      - uses: actions/cache@v2
#        with:
#          path: ${{ steps.composer-cache.outputs.dir }}
#          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
#          restore-keys: ${{ runner.os }}-composer-

      - name: install dependencies
        run: composer update --${{ matrix.dependency-version }}

      - name: run tests
#        run: php vendor/bin/phpunit --coverage-clover=coverage.clover
        run: php vendor/bin/phpunit

#      - name: upload code coverage
#        run: php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover


Revert "Try workflow with coverage upload again"
Revert "Try workflow with coverage upload again"

This reverts commit c90e0144fa9547f5f78d7a6a981b2b13b7d9faee.
