name: Build PR

on:
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Cache Gradle Caches
      id: cache-gradle-caches
      uses: actions/cache@v2
      with:
        key: ${{ runner.os }}-${{hashFiles('**/*.gradle')}}
        path: |
          ~/.gradle/caches
    - name: Cache Gradle Wrapper
      id: cache-gradle-wrapper
      uses: actions/cache@v2
      with:
        key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
        path: |
          ~/.gradle/wrapper
    - uses: gradle/wrapper-validation-action@v1
      name: Validate Gradle Wrapper

    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8

    - name: Build with Gradle
      run: ./gradlew build asciidoctor --stacktrace --parallel

    - uses: codecov/codecov-action@v1
      name: Publish Code Coverage
name: Build PR

on:
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Cache Gradle Caches
      id: cache-gradle-caches
      uses: actions/cache@v2
      with:
        key: ${{ runner.os }}-${{hashFiles('**/*.gradle')}}
        path: |
          ~/.gradle/caches
    - name: Cache Gradle Wrapper
      id: cache-gradle-wrapper
      uses: actions/cache@v2
      with:
        key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
        path: |
          ~/.gradle/wrapper
    - uses: gradle/wrapper-validation-action@v1
      name: Validate Gradle Wrapper

    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8

    - name: Build with Gradle
      run: ./gradlew build asciidoctor --stacktrace --parallel --scan

    - uses: codecov/codecov-action@v1
      name: Publish Code Coverage
Enable build scans for PRs
Enable build scans for PRs
