-
Notifications
You must be signed in to change notification settings - Fork 20
52 lines (43 loc) · 1.45 KB
/
Copy pathspotless.yml
File metadata and controls
52 lines (43 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Spotless
on:
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
spotless-check:
runs-on: ubuntu-latest
name: spotless-check
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- name: Reclaim disk space
working-directory: .github/scripts
shell: bash
run: ./ci-reclaim-disk-space.sh
- name: Set up Java 17
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: 17
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@5e2ebd065dc2488b7a6ad670704656cbbe1e8f60 # v6.1.1
- name: Run Spotless check
run: |
if ! ./gradlew --no-daemon -Pjava.version=17 spotlessCheck; then
echo "::error title=Spotless check failed::Formatting violations were found."
echo "Fix options:"
echo " 1) Run: ./gradlew --no-daemon spotlessApply"
echo " 2) Ensure your IDE honors .editorconfig and reformat changed files"
echo "Then commit and push the updated files."
exit 1
fi