name: "Continuous Integration"

on: [push]

jobs:
  build:
    runs-on: ${{ matrix.operating-system }}
    strategy:
      max-parallel: 3
      matrix:
        operating-system: [ubuntu-latest]
        php-versions: ['7.2', '7.3', '7.4']
    steps:
    - uses: actions/checkout@master

    - name: Install PHP
      uses: shivammathur/setup-php@master
      with:
        php-version: ${{ matrix.php-versions }}
        extensions: mbstring, xdebug

    - name: Validate composer.json and composer.lock
      run: composer validate

    - name: Install dependencies
      run: composer install --prefer-dist --no-progress --no-suggest

    - name: Install tooling
      run: tools/phive --no-progress --home ./.phive install --trust-gpg-keys 4AA394086372C20A,31C7E470E2138192,8E730BA25823D8B5,CF1A108D0E7AE720 --force-accept-unsigned

    - name: Execute unit tests
      run: tools/phpunit

    - name: Check coding style
      run: tools/phpcs --standard=psr12 src tests

    - name: Static code analysis
      run: tools/phpstan analyse

name: "Continuous Integration"

on: [push]

jobs:
  build:
    runs-on: ${{ matrix.operating-system }}
    strategy:
      max-parallel: 3
      matrix:
        operating-system: [ubuntu-latest]
        php-versions: ['7.2', '7.3', '7.4']
    steps:
    - uses: actions/checkout@master

    - name: Install PHP
      uses: shivammathur/setup-php@master
      with:
        php-version: ${{ matrix.php-versions }}
        extensions: mbstring, xdebug

    - name: Update composer
      run: composer self-update

    - name: Validate composer.json and composer.lock
      run: composer validate

    - name: Install dependencies
      run: composer install --prefer-dist --no-progress --no-suggest

    - name: Install tooling
      run: tools/phive --no-progress --home ./.phive install --trust-gpg-keys 4AA394086372C20A,31C7E470E2138192,8E730BA25823D8B5,CF1A108D0E7AE720 --force-accept-unsigned

    - name: Execute unit tests
      run: tools/phpunit

    - name: Check coding style
      run: tools/phpcs --standard=psr12 src tests

    - name: Static code analysis
      run: tools/phpstan analyse

Make sure composer is up to date
Make sure composer is up to date
