name: CI
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
jobs:
  validate:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - name: Validate composer.json and composer.lock
        run: make validate
  php7-2:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - name: Run test suite
        run: make test-php7-2
  php7-3:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - name: Run test suite
        run: make test-php7-3
  php7-4:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - name: Run test suite
        run: make test-php7-4
  php8-0:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - name: Run test suite
        run: make test-php8-0

name: unit-tests
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
jobs:
  validate:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - name: Validate composer.json and composer.lock
        run: make validate
  php7-2:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - name: Run test suite
        run: make test-php7-2
  php7-3:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - name: Run test suite
        run: make test-php7-3
  php7-4:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - name: Run test suite
        run: make test-php7-4
  php8-0:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - name: Run test suite
        run: make test-php8-0

Refactor ci workflow to unit tests workflow.
Refactor ci workflow to unit tests workflow.
