Skip to content

Conversation

Lee-W
Copy link
Member

@Lee-W Lee-W commented Dec 27, 2019

This PR is based #100 and should be reviewed after #100 is merged.
There is an error hard to fix in the original design but is fixed in the "refactor-config" new design.

without separating, the pipeline will continue when the third step succeeded even if the first two steps failed

#106

@Lee-W Lee-W force-pushed the split-run-test-step-in-github-action branch 2 times, most recently from f572f9e to a5e15d5 Compare December 27, 2019 04:26
@Lee-W
Copy link
Member Author

Lee-W commented Dec 27, 2019

@woile I've tested the failed test test_bump_command on my local machine, but it succeeded. Do you have any clue on why this failed in Github Action?

@Lee-W Lee-W force-pushed the split-run-test-step-in-github-action branch from 6374a19 to 0a7135d Compare December 27, 2019 11:04
@Lee-W
Copy link
Member Author

Lee-W commented Dec 27, 2019

I've already figured out the problem is lacking git user when running test and fixed it.

without separating, the pipeline will continue when the third step succeeded even if the first two steps failed

commitizen-tools#106
@Lee-W Lee-W force-pushed the split-run-test-step-in-github-action branch from 0a7135d to 7f66b2a Compare December 27, 2019 15:57
@woile
Copy link
Member

woile commented Dec 30, 2019

I would like to leave the ./scripts/test. I want to keep the same interface for local development and ci.
If you check .github/workflows/bumpversion.yml, there's a Configure repo step, we can try adding that. But I've seen it failed when any of the steps fail. Could you share which step failed? Keep in mind that github actions are quite new and they are not working 100% fine.

@Lee-W
Copy link
Member Author

Lee-W commented Dec 31, 2019

The configure is not the main problem.
The problem is that the script will go on even if the previous steps fail.
For example, if I send a pull request that cannot pass the unit tests but without any style error. The pipeline will succeed.
I would recommend using invoke or make to solve this problem. I just tested if any of the steps return status code other than 0, both tool will break immediately.

This GitHub action result is an example of this problem.
The unit test failed but the run test step still passed.
https://github.com/Woile/commitizen/commit/00cedf53fdd069422b02773219a6fce5f4e3ee22/checks?check_suite_id=374432813

@woile
Copy link
Member

woile commented Dec 31, 2019

We only need to add #!/bin/sh -e at the beginning of the script and it will be solved.

If non-interactive, exit immediately if a command fails.

@Lee-W
Copy link
Member Author

Lee-W commented Dec 31, 2019

That sounds great. I just send another PR #109 for it. I'll close this one.

@Lee-W Lee-W closed this Dec 31, 2019
@Lee-W Lee-W deleted the split-run-test-step-in-github-action branch January 2, 2020 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants