Skip to content

Commit

Permalink
ci: add support for GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
stempler committed Sep 13, 2023
1 parent 8eef272 commit 5b67dfb
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Check

on:
pull_request:
branches:
- master

jobs:
gradle:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build and test with Gradle
run: ./gradlew clean check
# https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
report_paths: '*/build/test-results/*/*.xml'
check_name: 'JUnit test report (Gradle)'


maven:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup Maven
uses: s4u/[email protected]
with:
java-version: 17
java-distribution: temurin
maven-version: 3.9.0
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Generate sources with Gradle
run: ./gradlew regenerateSources
- name: Build and test with Maven
run: mvn clean verify # -Dmaven.test.failure.ignore=true
# https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
report_paths: '*/build/test-results/*/*.xml'
check_name: 'JUnit test report (Maven)'

0 comments on commit 5b67dfb

Please sign in to comment.