@@ -107,33 +107,31 @@ jobs:
107
107
run : |
108
108
./mvnw $MAVEN_ARGS ${{ matrix.os.maven.args }} clean install \
109
109
-Pjqassistant -Pdist -Prelocation
110
- env :
111
- DEVELOCITY_ACCESS_KEY : " ${{ secrets.DEVELOCITY_ACCESS_KEY || '' }}"
112
- # For jobs running on 'pull_request', upload build scan data.
113
- # The actual publishing must be done in a separate job (see ci-report.yml).
114
- # We don't write to the remote cache as that would be unsafe.
115
- - name : Upload GitHub Actions artifact for the Develocity build scan
116
- uses : actions/upload-artifact@v4
117
- if : " ${{ github.event_name == 'pull_request' && !cancelled() }}"
118
- with :
119
- name : build-scan-data-initial-${{ matrix.os.name }}
120
- path : ~/.m2/.develocity/build-scan-data
121
110
122
111
- name : Build code and run tests in container mode
123
112
run : |
124
113
./mvnw $MAVEN_ARGS ${{ matrix.os.maven.args }} clean verify \
125
114
-Pjqassistant -Pskip-checks \
126
115
-am -pl :hibernate-validator-tck-runner \
127
116
-Dincontainer -Dincontainer-prepared
128
- env :
129
- DEVELOCITY_ACCESS_KEY : " ${{ secrets.DEVELOCITY_ACCESS_KEY || '' }}"
130
- # Same as above, but for the build scan of the latest Maven run.
131
- - name : Upload GitHub Actions artifact for the Develocity build scan
117
+ # Workaround for https://github.com/actions/upload-artifact/issues/240
118
+ - name : List build reports to upload (if build failed)
119
+ if : ${{ failure() || cancelled() }}
120
+ # The weird syntax is because we're setting a multiline environment variable
121
+ # See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-a-multiline-string
122
+ run : |
123
+ {
124
+ echo 'buildReportPaths<<EOF'
125
+ find . -path '**/*-reports'
126
+ echo EOF
127
+ } >> "$GITHUB_ENV"
128
+ - name : Upload build reports (if build failed)
132
129
uses : actions/upload-artifact@v4
133
- if : " ${{ github.event_name == 'pull_request' && ! cancelled() }}"
130
+ if : ${{ failure() || cancelled() }}
134
131
with :
135
- name : build-scan-data-tck-container-${{ matrix.os.name }}
136
- path : ~/.m2/.develocity/build-scan-data
132
+ name : ${{ format('build-reports-{0}', matrix.os.name ) }}
133
+ path : ${{ env.buildReportPaths }}
134
+ retention-days : 7
137
135
138
136
- name : Omit produced artifacts from build cache
139
137
run : rm -r ~/.m2/repository/org/hibernate/validator
0 commit comments