11name : Build
2-
32on :
3+ # Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
44 push :
55 branches : [ master ]
6+ # Trigger the workflow on any pull request
67 pull_request :
78
89concurrency :
@@ -11,21 +12,27 @@ concurrency:
1112
1213jobs :
1314
14- # Prepare environment and build the plugin
15+ # Prepare the environment and build the plugin
1516 build :
1617 name : Build
1718 runs-on : ubuntu-latest
1819 outputs :
1920 version : ${{ steps.properties.outputs.version }}
2021 changelog : ${{ steps.properties.outputs.changelog }}
21- pluginVerifierHomeDir : ${{ steps.properties.outputs.pluginVerifierHomeDir }}
2222 steps :
2323
24+ # Free GitHub Actions Environment Disk Space
25+ - name : Maximize Build Space
26+ 27+ with :
28+ tool-cache : false
29+ large-packages : false
30+
2431 # Check out the current repository
2532 - name : Fetch Sources
2633 uses : actions/checkout@v4
2734
28- # Set up Java environment for the next steps
35+ # Set up the Java environment for the next steps
2936 - name : Setup Java
3037 uses : actions/setup-java@v4
3138 with :
4653 CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
4754
4855 echo "version=$VERSION" >> $GITHUB_OUTPUT
49- echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
50-
5156 echo "changelog<<EOF" >> $GITHUB_OUTPUT
5257 echo "$CHANGELOG" >> $GITHUB_OUTPUT
5358 echo "EOF" >> $GITHUB_OUTPUT
5661 - name : Build plugin
5762 run : ./gradlew buildPlugin
5863
59- # Run tests
64+ # Run tests and upload a code coverage report
6065 test :
6166 name : Test (${{ matrix.os }})
6267 needs : [ build ]
@@ -69,11 +74,19 @@ jobs:
6974 - macos-latest
7075 steps :
7176
77+ # Free GitHub Actions Environment Disk Space
78+ - name : Maximize Build Space
79+ 80+ if : runner.os == 'Linux'
81+ with :
82+ tool-cache : false
83+ large-packages : false
84+
7285 # Check out the current repository
7386 - name : Fetch Sources
7487 uses : actions/checkout@v4
7588
76- # Set up Java environment for the next steps
89+ # Set up the Java environment for the next steps
7790 - name : Setup Java
7891 uses : actions/setup-java@v4
7992 with :
8396 # Setup Gradle
8497 - name : Setup Gradle
8598 uses : gradle/actions/setup-gradle@v4
99+ with :
100+ cache-read-only : true
86101
87102 # Run tests
88103 - name : Run Tests
@@ -105,7 +120,7 @@ jobs:
105120
106121 # Free GitHub Actions Environment Disk Space
107122 - name : Maximize Build Space
108- uses : jlumbroso/free-disk-space@main
123+ uses : jlumbroso/free-disk-space@v1.3.1
109124 with :
110125 tool-cache : false
111126 large-packages : false
@@ -114,7 +129,7 @@ jobs:
114129 - name : Fetch Sources
115130 uses : actions/checkout@v4
116131
117- # Set up Java environment for the next steps
132+ # Set up the Java environment for the next steps
118133 - name : Setup Java
119134 uses : actions/setup-java@v4
120135 with :
@@ -124,17 +139,12 @@ jobs:
124139 # Setup Gradle
125140 - name : Setup Gradle
126141 uses : gradle/actions/setup-gradle@v4
127-
128- # Cache Plugin Verifier IDEs
129- - name : Setup Plugin Verifier IDEs Cache
130- uses : actions/cache@v4
131142 with :
132- path : ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides
133- key : plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
143+ cache-read-only : true
134144
135145 # Run Verify Plugin task and IntelliJ Plugin Verifier tool
136146 - name : Run Plugin Verification tasks
137- run : ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
147+ run : ./gradlew verifyPlugin
138148
139149 # Collect Plugin Verifier Result
140150 - name : Collect Plugin Verifier Result
0 commit comments