on:
  - pull_request
  - push

name: CI

jobs:
  run:
    name: Tests

    strategy:
      matrix:
        operating-system: [ubuntu-latest]
        php-versions: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']

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

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

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          extensions: json

      - name: Install dependencies with composer
        run: composer install

      - name: Run tests
        run: make test
