Skip to content

Commit

Permalink
Added GH Actions Workflow for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Nov 8, 2023
1 parent b40ae27 commit dfc8dd7
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'Build Pull Request'
run-name: Build for PR ${{ github.event.pull_request.number }}

on:
pull_request:
types:
- synchronize
- opened
- ready_for_review
- reopened

jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1000
fetch-tags: true

- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'microsoft'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Build
run: ./gradlew --info -s -x check build

- name: Test
run: ./gradlew --info -s check

# Always upload test results
- name: Merge Test Reports
if: success() || failure()
run: npx junit-report-merger junit.xml "**/TEST-*.xml"

- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-results
path: junit.xml

0 comments on commit dfc8dd7

Please sign in to comment.