name: Unit test

on:
  pull_request:
  push:
    branches: [ master ]

jobs:
  validate:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: 1.9
      - name: Gradle cache
        uses: actions/cache@v2
        with:
          path: ~/.gradle
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/src/main/java/dependencies/*.kt') }}-${{ hashFiles('**/*.gradle*') }}
          restore-keys: |
            ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/src/main/kotlin/com/chibatching/dep/*.kt') }}-
            ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-
      - name: Unit test
        run: ./gradlew jacocoTestReport --stacktrace
      - use: codecov/codecov-action@v1

Migrate unit test CI to GitHub Actions
Migrate unit test CI to GitHub Actions
