Skip to content

Commit

Permalink
Implement GHA PR checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n committed Nov 30, 2023
1 parent 55133eb commit 86d5a45
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 132 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and test PRs

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

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

# GradleUtils will append the branch name to the version,
# but for that we need a properly checked out branch
- name: Create branch for commit
run:
git switch -C pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.ref }}

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

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

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build

- name: Checks ATs, patches, etc...
uses: gradle/gradle-build-action@v2
with:
arguments: checkAll

- name: Checks JAR compatibility
uses: gradle/gradle-build-action@v2
with:
arguments: checkJarCompatibility
16 changes: 0 additions & 16 deletions .github/workflows/comments.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/issues.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/pull_request_review.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/pull_request_review_comment.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/pull_request_review_comment_run.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/pull_request_review_run.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/pull_requests.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/push.yml

This file was deleted.

0 comments on commit 86d5a45

Please sign in to comment.