name: CI

on: [push]

jobs:
 build-test:
   runs-on: ubuntu-latest

   steps:
     - name: Checkout Code
       uses: actions/checkout@v2

     - name: Setup PHP version
       uses: shivammathur/setup-php@v2
       with:
         php-version: '7.2'

     - name: Install composer and dependencies
       uses: php-actions/composer@v6

     - name: PHPUnit Tests
       uses: php-actions/phpunit@v3
       env:
         XDEBUG_MODE: coverage
       with:
         bootstrap: vendor/autoload.php
         configuration: phpunit.xml
         php_extensions: xdebug
         args: tests --coverage-clover ./coverage.xml

     - name: Upload to Codecov
       uses: codecov/codecov-action@v2
       with:
         token: ${{ secrets.CODE_COV_TOKEN }}
         files: ./coverage.xml
         verbose: true

name: CI

on: [push]

jobs:
 build-test:
   runs-on: ubuntu-latest

   steps:
     - name: Checkout Code
       uses: actions/checkout@v2

     - name: Setup PHP version
       uses: shivammathur/setup-php@v2
       with:
         php-version: '7.2'

     - name: Install composer and dependencies
       uses: php-actions/composer@v6
       with:
         php_version: '7.2'

     - name: PHPUnit Tests
       uses: php-actions/phpunit@v3
       env:
         XDEBUG_MODE: coverage
       with:
         bootstrap: vendor/autoload.php
         configuration: phpunit.xml
         php_extensions: xdebug
         args: tests --coverage-clover ./coverage.xml

     - name: Upload to Codecov
       uses: codecov/codecov-action@v2
       with:
         token: ${{ secrets.CODE_COV_TOKEN }}
         files: ./coverage.xml
         verbose: true

Set PHP version for tests.
Set PHP version for tests.