Uninett / nav

Network Administration Visualized
GNU General Public License v3.0
175 stars 38 forks source link

Do not publish test reports on pushes to master #2914

Closed johannaengland closed 1 month ago

johannaengland commented 1 month ago

Closes #2862.

This will only publish test results if the branch the workflow "Build NAV and run full test suite" is running on is not master.

Reference: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_runbranchesbranches-ignore

Does this workflow usually fail on pushes to other branches? Because the commit https://github.com/Uninett/nav/commit/3e434bc8f6c50284f1fd0b87189a0103d158d949#diff-208a7f7ef0a1174d68708f24502994bd2a136c75128806eb0cf63c0a70679321 does not do anything about this as far as I understand it.

See https://github.com/EnricoMi/publish-unit-test-result-action/releases/tag/v2.15.0 for the change in the publish Github action.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 60.23%. Comparing base (a52309e) to head (d46190b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2914 +/- ## ======================================= Coverage 60.23% 60.23% ======================================= Files 602 602 Lines 44050 44050 ======================================= Hits 26534 26534 Misses 17516 17516 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 1 month ago

Test results

     12 files       12 suites   11m 29s :stopwatch: 3 323 tests 3 323 :heavy_check_mark: 0 :zzz: 0 :x: 9 444 runs  9 444 :heavy_check_mark: 0 :zzz: 0 :x:

Results for commit d46190b2.

:recycle: This comment has been updated with latest results.

johannaengland commented 1 month ago

Test results

     12 files       12 suites   11m 40s ⏱️ 3 320 tests 3 320 ✔️ 0 💤 0 9 435 runs  9 435 ✔️ 0 💤 0

Results for commit 476c611.

So we see here that it definitely runs in pull requests. Now we just have to see that is does not run when pushing directly to master.