name: Run tests
on:
  push:
    branches:
      - master
  pull_request:

jobs:
  run-tests-job:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        gradle-task: [ 'check', 'grid', 'firefox_headless', 'chrome_headless' ]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: '11'
      - name: Setup Firefox
        if: ${{ matrix.gradle-task != 'check' }}
        run: |
          sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa
          sudo apt-get update
          sudo apt-get install firefox-trunk
      - name: Build with Gradle
        run: ./gradlew ${{ matrix.gradle-task }} --no-daemon --console=plain -i
      - uses: actions/upload-artifact@v2
        if: failure()
        with:
          name: test-report
          path: build/reports/

name: Run tests
on:
  push:
    branches:
      - master
  pull_request:

jobs:
  run-tests-job:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        gradle-task: [ 'check', 'grid', 'firefox_headless', 'chrome_headless' ]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: '11'
      - name: Setup Firefox
        if: ${{ matrix.gradle-task != 'check' }}
        run: |
          sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa
          sudo apt-get update
          sudo apt-get install firefox-trunk
      - name: Build with Gradle
        run: ./gradlew ${{ matrix.gradle-task }} --no-daemon --console=plain -i
      - uses: actions/upload-artifact@v2
        if: failure()
        with:
          name: test-report
          path: build/reports/

Disable fail fast on ci
Disable fail fast on ci
