Merge pull request #1 from gnagy/github-actions #5
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: Build with Gradle | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
checks: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# https://github.com/actions/setup-java | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'liberica' | |
# https://github.com/gradle/gradle-build-action | |
- name: Gradle - setup | |
uses: gradle/[email protected] | |
- name: Gradle - ktlintCheck | |
uses: gradle/[email protected] | |
with: | |
arguments: ktlintCheck | |
- name: Gradle - build | |
uses: gradle/[email protected] | |
with: | |
arguments: build | |
# https://github.com/marketplace/actions/junit-report-action | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: 'build/test-results/test/TEST-*.xml' |