diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 74ae70e..9c341c3 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -10,10 +10,10 @@ jobs: steps: - - name: Set up JDK 8 + - name: Set up JDK 11 uses: actions/setup-java@v1 with: - java-version: 8 + java-version: 11 - name: Cache Gradle id: cache-gradle @@ -24,32 +24,60 @@ jobs: - uses: actions/checkout@v1 - - name: Grant execute permission for gradlew + - name: Grant execute permission to gradlew run: chmod +x gradlew - name: Build - run: ./gradlew + run: ./gradlew build -x test env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload build artifacts uses: actions/upload-artifact@v2 with: - path: build/libs + path: "**/build/libs" + + test: + + runs-on: ubuntu-18.04 + + steps: + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Cache Gradle + id: cache-gradle + uses: actions/cache@v1 + with: + path: ~/.gradle + key: ${{ runner.os }}-gradle + + - uses: actions/checkout@v1 + + - name: Grant execute permission to gradlew + run: chmod +x gradlew + + - name: Test + run: ./gradlew test + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload CodeCov Report uses: codecov/codecov-action@v1 with: - file: build/reports/jacoco/**/*.xml + file: "**/build/reports/jacoco/**/*.xml" - name: Upload Test Report uses: actions/upload-artifact@v2 if: always() with: name: build reports - path: build/reports + path: "**/build/reports" release: - needs: [build] + needs: [build, test] if: github.ref == 'refs/heads/master' runs-on: ubuntu-18.04