77 push :
88 branches : [main, release]
99 workflow_dispatch :
10+
1011concurrency :
1112 group : ${{ github.workflow }}-${{ github.ref }}
1213 cancel-in-progress : true
@@ -18,35 +19,34 @@ jobs:
1819 buildcacheuser : ${{ secrets.BUILDCACHE_USER }}
1920 buildcachepass : ${{ secrets.BUILDCACHE_PASS }}
2021 steps :
21- - name : Checkout Code 📥
22+ - name : Checkout
2223 uses : actions/checkout@v6
2324 with :
2425 fetch-depth : 0
2526 - uses : actions/setup-java@v5
2627 with :
27- distribution : temurin
28+ distribution : " temurin"
2829 java-version : 21
29- - name : Setup Gradle 🐘
30+ - name : gradle caching
3031 uses : gradle/actions/setup-gradle@v5
3132 - name : Spotless ✨
32- run : ./gradlew clean spotlessCheck
33- - name : Error Prone 🚧
34- run : ./gradlew clean assemble
35- - name : Test Classes ⚙️
36- run : ./gradlew clean testClasses
33+ run : ./gradlew spotlessCheck
3734 - name : Rewrite ♻️
38- run : ./gradlew clean rewriteDryRun
35+ run : ./gradlew rewriteDryRun
36+ - name : assemble testClasses
37+ run : ./gradlew assemble testClasses
3938 build :
40- name : Build 🏗️
4139 needs : sanity-check
4240 strategy :
4341 fail-fast : false
4442 matrix :
4543 kind : [maven, gradle]
46- jre : [17, 21, 24] # test on the latest Java version once Gradle & Maven support it.
44+ # Test on the latest Java version once Gradle & Maven support it.
45+ jre : [17, 21, 24]
4746 os : [ubuntu-latest, windows-latest]
4847 include :
49- - kind : npm # npm on linux only (crazy slow on windows).
48+ # npm on linux only (crazy slow on windows)
49+ - kind : npm
5050 jre : 17
5151 os : ubuntu-latest
5252 - kind : shfmt
@@ -58,64 +58,66 @@ jobs:
5858 os : ubuntu-latest
5959 runs-on : ${{ matrix.os }}
6060 steps :
61- - name : Checkout Code 📥
61+ - name : Checkout
6262 uses : actions/checkout@v6
6363 - uses : actions/setup-java@v5
6464 with :
65- distribution : temurin
65+ distribution : " temurin"
6666 java-version : ${{ matrix.jre }}
67- - name : Setup Gradle 🐘
67+ - name : gradle caching
6868 uses : gradle/actions/setup-gradle@v5
69- - name : Build Maven 🪶
69+ - name : build (maven-only)
7070 if : matrix.kind == 'maven'
71- run : ./gradlew :plugin-maven:build -x spotlessCheck
72- - name : Build Gradle 🐘
71+ run : ./gradlew :plugin-maven:build -x spotlessCheck -x rewriteDryRun
72+ - name : build (everything-but-maven)
7373 if : matrix.kind == 'gradle'
74- run : ./gradlew build -PSPOTLESS_EXCLUDE_MAVEN=true -x spotlessCheck
75- - name : Test npm 📊
74+ run : ./gradlew build -x spotlessCheck -x rewriteDryRun -PSPOTLESS_EXCLUDE_MAVEN=true
75+ - name : test npm
7676 if : matrix.kind == 'npm'
7777 run : ./gradlew testNpm
78- - name : Setup Go
78+ - name : Setup go
7979 if : matrix.kind == 'shfmt'
8080 uses : actions/setup-go@v6
8181 with :
82- go-version : stable
83- - name : Install shfmt 📥
82+ go-version : ' stable'
83+ - name : Install shfmt
8484 if : matrix.kind == 'shfmt'
85- run : go install mvdan.cc/sh/v3/cmd/shfmt@${{ matrix.shfmt-version }}
86- - name : Test shfmt 📊
85+ run : |
86+ go install mvdan.cc/sh/v3/cmd/shfmt@${{ matrix.shfmt-version }}
87+ - name : Test shfmt
8788 if : matrix.kind == 'shfmt'
8889 run : ./gradlew testShfmt
89- - name : Test IDEA 📊
90+ - name : Test idea
9091 if : matrix.kind == 'idea'
9192 run : |
9293 download_link=$(curl https://data.services.jetbrains.com/products/releases\?code\=IIC\&latest\=true\&type\=release | jq -r '.IIC[0].downloads.linux.link')
93- curl --location $download_link -o idea.tar.gz
94+ curl --location " $download_link" -o idea.tar.gz
9495 tar -xf idea.tar.gz
9596 cd idea-IC*
9697 export PATH=${PATH}:$(pwd)/bin
9798 cd ..
9899 ./gradlew testIdea
99- - name : Junit Report 📋
100+ - name : junit result
100101 uses : mikepenz/action-junit-report@v6
101- if : always() # always run even if the previous step fails.
102+ if : always() # always run even if the previous step fails
102103 with :
103104 check_name : JUnit ${{ matrix.kind }} ${{ matrix.jre }} ${{ matrix.os }}
104105 report_paths : ' */build/test-results/*/TEST-*.xml'
105106 check_retries : true
106- complete : # this check is required in branch protection rules.
107- name : Complete ✅
107+
108+ # Status check that is required in branch protection rules.
109+ final-status :
108110 needs :
109111 - sanity-check
110112 - build
111113 runs-on : ubuntu-latest
112114 if : always()
113115 steps :
114- - name : Check 🦉
116+ - name : Check
115117 run : |
116118 results=$(tr -d '\n' <<< '${{ toJSON(needs.*.result) }}')
117- if ! grep -q -v -E '(failure|cancelled)' <<< $results; then
118- echo ❌ One or more required jobs failed.
119+ if ! grep -q -v -E '(failure|cancelled)' <<< " $results" ; then
120+ echo " One or more required jobs failed"
119121 exit 1
120122 fi
121- echo ✅ All required jobs completed successfully.
123+ echo " All required jobs completed successfully."
0 commit comments