Skip to content

Commit e81907a

Browse files
committed
fix: separate build, test, and Detekt steps in CI workflows for clarity and improved caching
1 parent 446d050 commit e81907a

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ jobs:
3030
with:
3131
cache-read-only: false # Allow writing to cache on main/dev branches
3232

33-
- name: Build plugin, run tests, and Detekt in one command
34-
run: ./gradlew build detekt --parallel --build-cache --configuration-cache
33+
- name: Build plugin
34+
run: ./gradlew build --build-cache
35+
36+
- name: Run Detekt
37+
run: ./gradlew detekt --build-cache
3538
continue-on-error: true # Don't fail CI if Detekt finds issues
3639

3740
- name: Upload test results

.github/workflows/release.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,27 +64,38 @@ jobs:
6464
java-version: '17'
6565
cache: 'gradle' # Cache Gradle dependencies
6666

67-
- name: Setup Gradle
68-
uses: gradle/actions/setup-gradle@v4
69-
with:
70-
cache-read-only: false
71-
7267
- name: Free up disk space
7368
run: |
69+
# Remove large unused packages BEFORE setting up Java/Gradle
7470
sudo rm -rf /usr/share/dotnet
7571
sudo rm -rf /opt/ghc
7672
sudo rm -rf /usr/local/share/boost
77-
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
73+
sudo rm -rf /usr/local/lib/android
74+
sudo rm -rf /usr/share/swift
7875
df -h
7976
77+
- name: Setup Gradle
78+
uses: gradle/actions/setup-gradle@v4
79+
with:
80+
cache-read-only: false
81+
8082
- name: Update version in gradle.properties
8183
run: |
8284
./gradlew updateVersion -PnewVersion=${{ needs.validate-version.outputs.version }} --no-configuration-cache
8385
84-
- name: Build, test, and verify plugin
85-
run: |
86-
./gradlew buildPlugin test detekt runPluginVerifier --parallel --build-cache
87-
continue-on-error: true # Don't fail release if Detekt or verifier has issues
86+
- name: Build plugin
87+
run: ./gradlew buildPlugin --build-cache
88+
89+
- name: Run tests
90+
run: ./gradlew test --build-cache
91+
92+
- name: Run Detekt
93+
run: ./gradlew detekt --build-cache
94+
continue-on-error: true # Don't fail release if Detekt finds issues
95+
96+
- name: Run Plugin Verifier
97+
run: ./gradlew runPluginVerifier --build-cache
98+
continue-on-error: true # Don't fail release if verifier has issues
8899

89100
- name: Upload build artifacts
90101
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)