-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test badge #415
Test badge #415
Conversation
The idea is to have the status badge report if the tests are passing, without considering codecov since it frequently fails due to some network hickup that makes the report upload to fail. This also makes things a bit more compartimentalized.
relevant reference: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run Also:
|
00c1c59
to
eabd8b9
Compare
tested on https://github.com/pipreqsxp/pipreqs/actions/runs/6800189760/job/18488179557 and tests work as expected once they reach the main branch, with codecov being called after a successful run of "Tests". (The code coverage test is expected to fail since that repo doesnt have the codecov token to perform the upload) |
.. image:: https://img.shields.io/travis/bndr/pipreqs.svg | ||
:target: https://travis-ci.org/bndr/pipreqs | ||
|
||
.. image:: https://github.com/bndr/pipreqs/actions/workflows/tests.yml/badge.svg?branch=master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set the tracking to tests performed on the master branch, a broken test in the next branch or in a random PR doesnt seem to be very informative or relevant to users since unless they manually instal pipreqs they will get the master branch through pypi
jobs: | ||
coverage_report: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the pipeline fails, will the badge reflect update the status?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the pipeline fails (aka any of the tests fail) the coverage_report workflow won't be run and if the branch being tested happens to be the master branch, then the badge will be updated as failing
That would be nice but sadly we run into a problem of not having permission for the bot to do its thing. In the interest of time I will drop this idea for now and create an issue to register our interest for the future. Here is the step I tried to implement into the workflow:
|
there seems to be an issue, the codecov test is run but doesnt show up in the PR, it seems to loose any association with what trigerred it |
0605ede
to
eabd8b9
Compare
07a4a64
to
64fc5a2
Compare
update status badge from travis to github action and Break tests and codecov workflow in 2.
The idea is to have the status badge report if the tests are passing,
without considering codecov since it frequently fails due to some
network hickup that makes the report upload to fail.
This also makes things a bit more compartimentalized.