You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix conditionals that trigger Artifact upload (#38236)
#### Description
After the revert done in
#38230
and
#38231,
I'm looking yet again on what went wrong there.
I'm solving this in small parts, and this PR focuses on ensuring JUnit
Artifacts are uploaded correctly.
#### Link to tracking issue
Still related to
#36761
#### Testing
I plan to test this by looking at the artifacts produced in this PR. The
JUnit files need to be there. See
https://github.com/actions/upload-artifact?tab=readme-ov-file#where-does-the-upload-go
---------
Signed-off-by: Arthur Silva Sens <[email protected]>
if: github.ref != 'refs/heads/main' # Runs on every PR and both go versions
290
291
run: make gotest GROUP=${{ matrix.group }}
291
292
- name: Run Unit Tests With JUnit and Coverage
292
-
if: startsWith( matrix.go-version, '1.23' ) # only run junit/coverage on one version
293
+
id: tests-with-junit
294
+
if: startsWith( matrix.go-version, '~1.23' ) && github.ref == 'refs/heads/main' && github.event_name == 'push' # only run junit/coverage on one version and only on main
295
+
continue-on-error: true # Allow uploading artifacts even if the test fails
293
296
run: make gotest-with-junit-and-cover GROUP=${{ matrix.group }}
294
297
- uses: actions/upload-artifact@v4
295
-
if: startsWith( matrix.go-version, '1.23' ) # only upload artifact for one version
298
+
if: startsWith( matrix.go-version, '~1.23' ) && github.ref == 'refs/heads/main' && github.event_name == 'push' # only upload artifact for one version and only on main
if: startsWith( matrix.go-version, '1.23' ) # only upload artifact for one version
303
+
if: startsWith( matrix.go-version, '~1.23' ) && github.ref == 'refs/heads/main' && github.event_name == 'push' # only upload artifact for one version and only on main
0 commit comments