name: PHPUnit on: push: branches: - master - galactica pull_request: release: types: - created jobs: unit_tests: name: Unit tests runs-on: ubuntu-latest strategy: matrix: include: - php: 8.0 coveralls: true - php: 8.1 coveralls: false steps: - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} tools: composer:v2 coverage: xdebug - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 - name: Composer install run: composer install --ignore-platform-reqs --no-scripts - name: Run tests env: XDEBUG_MODE: coverage run: | mkdir .logs ./vendor/bin/phpunit --coverage-clover build/logs/coverage.xml - name: Run Coveralls if: ${{ matrix.coveralls }} env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./vendor/bin/php-coveralls -v --coverage_clover build/logs/coverage.xml