@@ -57,21 +57,40 @@ jobs:
5757 - name : Setup Gradle
5858 uses : gradle/gradle-build-action@v2
5959 - name : Run tests
60- run : ./.github/scripts/test.sh --caffeine=strongKeys --caffeine=weakKeys --caffeine=check
60+ run : |
61+ stopMarker=$(uuidgen)
62+ echo "::stop-commands::$stopMarker"
63+ trap "echo '::$stopMarker::'" EXIT
64+ ./.github/scripts/test.sh \
65+ --caffeine=strongKeys \
66+ --caffeine=weakKeys \
67+ --caffeine=check
68+ - name : Compress test results
69+ uses : sibiraj-s/action-archiver@v1
70+ if : always() && (matrix.java == env.MAX_JVM)
71+ with :
72+ path : ' **/results/*.xml'
73+ output : caffeine.tar.gz
74+ format : tar
75+ gzip : true
6176 - name : Upload test results
6277 uses : actions/upload-artifact@v3
63- if : ( matrix.java == env.MAX_JVM) && always( )
78+ if : always() && ( matrix.java == env.MAX_JVM)
6479 with :
6580 retention-days : 1
6681 name : caffeine-test-results
67- path : ' **/results/*.xml '
82+ path : caffeine.tar.gz
6883 - name : Publish Coverage
6984 if : >
7085 matrix.java == env.MAX_JVM
7186 && github.event_name == 'push'
7287 env :
7388 COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
74- run : ./gradlew --daemon coveralls -S
89+ run : |
90+ stopMarker=$(uuidgen)
91+ echo "::stop-commands::$stopMarker"
92+ trap "echo '::$stopMarker::'" EXIT
93+ ./gradlew --daemon coveralls -S
7594 continue-on-error : true
7695 - name : SonarQube
7796 if : >
81100 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
82101 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
83102 run : |
103+ stopMarker=$(uuidgen)
104+ echo "::stop-commands::$stopMarker"
105+ trap "echo '::$stopMarker::'" EXIT
84106 git fetch --unshallow
85107 ./gradlew --daemon sonarqube -S -Dsonar.branch.name=${GITHUB_REF##*/}
86108 continue-on-error : true
@@ -129,14 +151,29 @@ jobs:
129151 - name : Setup Gradle
130152 uses : gradle/gradle-build-action@v2
131153 - name : Run tests
132- run : ./.github/scripts/test.sh --guava=strongKeys --guava=weakKeys --guava=check
154+ run : |
155+ stopMarker=$(uuidgen)
156+ echo "::stop-commands::$stopMarker"
157+ trap "echo '::$stopMarker::'" EXIT
158+ ./.github/scripts/test.sh \
159+ --guava=strongKeys \
160+ --guava=weakKeys \
161+ --guava=check
162+ - name : Compress test results
163+ uses : sibiraj-s/action-archiver@v1
164+ if : always() && (matrix.java == env.MAX_JVM)
165+ with :
166+ path : ' **/results/*.xml'
167+ output : guava.tar.gz
168+ format : tar
169+ gzip : true
133170 - name : Upload test results
134171 uses : actions/upload-artifact@v3
135- if : ( matrix.java == env.MAX_JVM) && always( )
172+ if : always() && ( matrix.java == env.MAX_JVM)
136173 with :
137174 retention-days : 1
138175 name : guava-test-results
139- path : ' **/results/*.xml '
176+ path : guava.tar.gz
140177 - name : Stop Gradle daemon
141178 if : always()
142179 run : ./gradlew --stop
@@ -145,12 +182,91 @@ jobs:
145182 continue-on-error : true
146183 if : failure()
147184
148- event_file :
149- name : Event File
185+ lincheck :
186+ name : Linearization Tests
150187 runs-on : ubuntu-latest
151188 steps :
152- - name : Upload
153- uses : actions/upload-artifact@v2
154- with :
155- name : Event File
156- path : ${{ github.event_path }}
189+ - uses : actions/checkout@v3
190+ - name : Set up JDK ${{ env.MAX_JVM }}
191+ uses : actions/setup-java@v3
192+ with :
193+ cache : ' gradle'
194+ distribution : ' zulu'
195+ java-version : ${{ env.MAX_JVM }}
196+ - name : Setup Gradle
197+ uses : gradle/gradle-build-action@v2
198+ - name : Run tests
199+ run : |
200+ stopMarker=$(uuidgen)
201+ echo "::stop-commands::$stopMarker"
202+ trap "echo '::$stopMarker::'" EXIT
203+ JAVA_VERSION=$MAX_JVM
204+ ./gradlew lincheckTest
205+ - name : Compress test results
206+ uses : sibiraj-s/action-archiver@v1
207+ if : always()
208+ with :
209+ path : ' **/results/*.xml'
210+ output : lincheck.tar.gz
211+ format : tar
212+ gzip : true
213+ - name : Upload test results
214+ uses : actions/upload-artifact@v3
215+ if : always()
216+ with :
217+ retention-days : 1
218+ name : lincheck-test-results
219+ path : lincheck.tar.gz
220+
221+ test-summary :
222+ name : Test Summary
223+ runs-on : ubuntu-latest
224+ needs : [caffeine, guava, lincheck]
225+ permissions :
226+ checks : write
227+ steps :
228+ - name : Download Guava Tests
229+ uses : actions/download-artifact@v3
230+ with :
231+ name : guava-test-results
232+ - name : Download Caffeine Tests
233+ uses : actions/download-artifact@v3
234+ with :
235+ name : caffeine-test-results
236+ - name : Download Lincheck Tests
237+ uses : actions/download-artifact@v3
238+ with :
239+ name : lincheck-test-results
240+ - name : Decompress
241+ run : |
242+ mkdir guava && tar -zxf guava.tar.gz --directory guava
243+ mkdir caffeine && tar -zxf caffeine.tar.gz --directory caffeine
244+ mkdir lincheck && tar -zxf lincheck.tar.gz --directory lincheck
245+ - name : Publish Test Results
246+ uses : EnricoMi/publish-unit-test-result-action@v1
247+ continue-on-error : true
248+ id : test-results
249+ with :
250+ comment_mode : off
251+ ignore_runs : true
252+ job_summary : true
253+ files : ' **/*.xml'
254+ - name : Format Test Count
255+ run : |
256+ LANG=en_US.utf8
257+ COUNT=${{ fromJSON(steps.test-results.outputs.json).stats.runs }}
258+ echo "TEST_COUNT=$(printf "%'d" $COUNT)" >> $GITHUB_ENV
259+ - name : Create badge
260+ uses : emibcn/badge-action@d6f51ff11b5c3382b3b88689ae2d6db22d9737d1
261+ with :
262+ label : tests
263+ color : 31c653
264+ path : badge.svg
265+ status : ${{ env.TEST_COUNT }}
266+ - name : Upload badge to Gist
267+ uses : andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
268+ if : endsWith(github.ref, github.event.repository.default_branch)
269+ with :
270+ gistURL : https://gist.githubusercontent.com/ben-manes/c20eb418f0e0bd6dfe1c25beb35faae4
271+ token : ${{ secrets.GIST_TOKEN }}
272+ file : badge.svg
0 commit comments