name: PHP Composer

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build-test:
    strategy:
      fail-fast: true
      matrix:
        operating-system: [ubuntu-latest]
        php: ['8.0', '8.1']

    name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}

    runs-on: ${{ matrix.operating-system }}

    steps:
      - uses: actions/checkout@v2
      - uses: php-actions/composer@master
      - name: PHPUnit Tests
        uses: php-actions/phpunit@v1
        with:
          bootstrap: vendor/autoload.php
          configuration: phpunit.xml
          args: --coverage-text
      - name: Check PHP Version
        run: php -v

name: PHP Composer

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build-test:
    strategy:
      fail-fast: true
      matrix:
        operating-system: [ubuntu-latest]
        php: ['8.0', '8.1']

    name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}

    runs-on: ${{ matrix.operating-system }}

    steps:
      - uses: actions/checkout@v2
      - uses: php-actions/composer@master
      - name: PHPUnit Tests
        uses: php-actions/phpunit@v1
        with:
          php_version: ${{ matrix.php-versions }}
          bootstrap: vendor/autoload.php
          configuration: phpunit.xml
          args: --coverage-text
      - name: Check PHP Version
        run: php -v

Set PHP version from matrix.
Set PHP version from matrix.