upgrade errorprone #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Master Build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build Java ${{ matrix.java }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
java: | |
- 8 | |
- 11 | |
- 17 | |
include: | |
- os: ubuntu-latest | |
java: 11 | |
coverage: true | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v1 | |
- name: Setup java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
- name: Cache Gradle Modules | |
uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: gradle-caches-${{ hashFiles('**/*.gradle.kts') }} | |
- name: Cache Gradle Wrapper | |
uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/wrapper | |
key: gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Execute Gradle build | |
run: ./gradlew build ${{ matrix.coverage && 'codeCoverageReport' || '' }} --stacktrace | |
shell: bash | |
env: | |
CI: true | |
- uses: codecov/codecov-action@v1 | |
if: ${{ matrix.coverage }} | |
with: | |
files: ./jacoco/build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml | |
- uses: actions/upload-artifact@v2 | |
if: ${{ matrix.coverage }} | |
with: | |
name: coverage-report | |
path: jacoco/build/reports/jacoco/codeCoverageReport/html | |
# publish: | |
# name: Publish snapshots | |
# runs-on: ubuntu-latest | |
# needs: build | |
# steps: | |
# - name: Checkout Repository | |
# uses: actions/checkout@v1 | |
# - name: Setup java | |
# uses: actions/setup-java@v1 | |
# with: | |
# java-version: 11 | |
# - name: Cache Gradle Modules | |
# uses: actions/cache@v1 | |
# with: | |
# path: ~/.gradle/caches | |
# key: gradle-caches-${{ hashFiles('**/*.gradle.kts') }} | |
# - name: Cache Gradle Wrapper | |
# uses: actions/cache@v1 | |
# with: | |
# path: ~/.gradle/wrapper | |
# key: gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
# - name: Execute Gradle publish | |
# run: ./gradlew snapshot --stacktrace --info | |
# shell: bash | |
# env: | |
# CI: true | |
# SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
# SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
# GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | |
# GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
# GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} |