- 
  Notifications
 You must be signed in to change notification settings 
- Fork 24
Automatically triggers test action and waits for test results before merged #71
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
Conversation
Seems like a complex solution. Typically, I would
- create a test branch
- modify the either/both workflow(s) to use the specific branch of cpp-linter-action repo
- trigger the workflow. Lately, I've had to do this manually because the push triggers were removed at some point (which just adds more work).
My only objection to this is when we need to test a PR event. I think using this approach would entail
- merging a test branch to master
- opening another branch to PR master into the new branch
- when done testing, reset master to previous commit (prior to merging test branch into master)
Am I understanding this correctly?
I wish we could use reusable workflows, but we still have the non-dynamic uses problem, and we can't call a reusable workflow from a workflow that uses a matrix.
I totally agree with your workflow, that's the right one, the only problem is it involves manual work.
This PR is not good, its approach is to check merged code and revert if any test failed 😢
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 personally won't use it, but I don't think it would hurt to have it (even if only to try it out). You made me curious... 🤓
Convert to draft in case there is other good options.
I have an idea that I can add a tag for each latest commit, for example, tag lastest.
Then change the uses from cpp-linter/cpp-linter-action@master to cpp-linter/cpp-linter-action@latest
Co-authored-by: Brendan <2bndy5@gmail.com>
I didn't realize this was the action repo. I thought this was the test repo.
Oh, so you felt curious yesterday
I'm still curious.
Sorry, I'm rather distracted. I'm writing a C/C++ source code parser using clang to automate beautiful documentation in Sphinx. Doxygen SUCKS, and breathe (extension for Sphinx) is limited to Doxygen's XML output (which is worse than Doxyen's HTML output).
For this PR, I just want to test any PRs using the test actions in the test repo without any manual work. Bypass passing variables to uses, I used a fixed tag latest to achive, a little complex solution.
I'm not familly with Sphinx, it looks like a beautiful document tool and polular. plooking forward to use it :)
Uh oh!
There was an error while loading. Please reload this page.
Since we can not pass branch variables like
cpp-linter/cpp-linter-action@${{ branch_name }}in the test action YAML file, the laziest way is to wait for the PR to be merged into the master branch and test it. (hope we could have another better way for testing before merging in the future)Instead of manully running the test actions, I'm creating this action to automatically trigger test repo actions and wait for the result when PR is merged.