Skip to content

Commit

Permalink
Merge pull request #10 from Zorbatron/spotless-workflow
Browse files Browse the repository at this point in the history
Add spotless checking to PRs
  • Loading branch information
Zorbatron authored Sep 8, 2024
2 parents 1221757 + f18c3bf commit c362aa9
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/actions/build_setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copied from GT:CEu
name: Build Setup
description: Setup for standard Java builds

inputs:
update-cache:
description: If cache should be updated
required: false
default: false

runs:
using: 'composite'

steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-write-only: ${{ inputs.update-cache }}
generate-job-summary: false
gradle-home-cache-includes: |
caches
caches/retro_futura_gradle
notifications
jdks
wrapper
28 changes: 28 additions & 0 deletions .github/workflows/format_java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copied from GT:CEu
# Runs formatting requirements
name: Java Formatting

on:
push:
branches:
- master
pull_request:

concurrency:
group: formatting-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
formatting:
name: Formatting
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Build
uses: ./.github/actions/build_setup

- name: Run Spotless Formatting Check with Gradle
run: ./gradlew spotlessCheck --warning-mode all --build-cache

0 comments on commit c362aa9

Please sign in to comment.