name: tests

on:
  push:
  pull_request:

jobs:
  linux_tests:
    runs-on: ubuntu-18.04
    if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"

    strategy:
      fail-fast: true
      matrix:
        php: ["5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"]

    name: PHP ${{ matrix.php }}

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

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          extensions: mbstring, posix
          coverage: none

      - name: Setup problem matchers
        run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

      - name: Fix PHPUnit for PHP 8.0
        run: composer config platform.php 7.4
        if: matrix.php >= 8.0

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

      - name: GnuPG version
        run: gpg --version

      - name: Execute tests
        run: vendor/bin/phpunit --stop-on-error tests

      - name: Upload artifacts
        uses: actions/upload-artifact@master
        if: failure()
        with:
          name: Logs
          path: tests/debug.log

name: tests

on:
  push:
  pull_request:

jobs:
  linux_tests:
    runs-on: ubuntu-18.04
    if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"

    strategy:
      fail-fast: true
      matrix:
        php: ["5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"]

    name: PHP ${{ matrix.php }}

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

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          extensions: mbstring, posix
          coverage: none

      - name: Setup problem matchers
        run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

      - name: Fix PHPUnit for PHP 8.0
        run: composer config platform.php 7.4
        if: matrix.php >= 8.0

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

      - name: GnuPG version
        run: gpg --version

      - name: Execute tests
        shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
        run: vendor/bin/phpunit --stop-on-error tests

      - name: Upload artifacts
        uses: actions/upload-artifact@master
        if: failure()
        with:
          name: Logs
          path: tests/debug.log

Set shell for phpunit command run - trying to fix TTY issue
GA: Set shell for phpunit command run - trying to fix TTY issue
