Skip to content
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

Continue running tests even if previous unit tests failed #7

Closed
fengyuentau opened this issue May 31, 2022 · 3 comments · Fixed by #9
Closed

Continue running tests even if previous unit tests failed #7

fengyuentau opened this issue May 31, 2022 · 3 comments · Fixed by #9
Labels
enhancement New feature or request

Comments

@fengyuentau
Copy link
Member

fengyuentau commented May 31, 2022

I propose to continue running tests when build completes but previous unit tests fail. You can see from this log that GitHub Actions workflow stops once there is an error. However, for a workflow which completes building, stopping at one possible failed unit test is too inefficient.

An implementation to this feature can be as follows:

jobs:
  BuildAndTest:
    steps:
        # ...
        - name: Build OpenCV
           id: build-opencv # used as reference below
           run: #...
        # ...
        - name: Accuracy:core
          if: ${{ always() && steps.build-opencv.outcome == 'success' }}
          run: #...

This should work and show "failed" in overall page if one test fails.

What do you think? @alalek @asenyaev @asmorkalov

Reference:

@asenyaev
Copy link
Contributor

Sure, completely agree. In this case we will know about all failed tests, and avoid the situation when a test failed and you fix it, but another test failed in a new pipeline.

@fengyuentau
Copy link
Member Author

fengyuentau commented Jun 1, 2022

I implemented an example here: https://github.com/opencv/ci-gha-workflow/runs/6682229472?check_suite_focus=true#logs

In overview page it still shows failed instead of passed.
image

@asenyaev
Copy link
Contributor

asenyaev commented Jun 2, 2022

That's good, I like this idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants