-
Notifications
You must be signed in to change notification settings - Fork 4
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
Extend selftest workflow to multiple runners #9
Conversation
This should help catch errors like GoTestTools#4 and GoTestTools#8 by ensuring that gotestfmt can run on all the major OS runners for GitHub Actions. Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
Extend selftest workflow to multiple runners
Hmm, further experimentation shows that the |
This allows `bash` and `pwsh` syntax to be used separately to avoid having to write the test as a polyglot 😬 Also added `secrets.GITHUB_TOKEN` as a fallback in case the repo secret `secrets.GH_TOKEN` is not set up, e.g. in a fork. Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
On MacOS, this results in: ``` Error: Provided rootDirectory /tmp is not a valid directory ``` On Windows this results in: ``` Error: No files were found with the provided path: /tmp/gotest.windows.log. No artifacts will be uploaded. ``` Both seem to be unhappy with `/tmp`, since the workspace is implicitly cleaned up at the end of the workflow, there shouldn't be a need to specify `/tmp`. Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
Separate windows step from *nix runners
Ok, I've refactored the workflow a bit so that the If you'd like to merge my changes now I think the new workflow still could be useful, the only thing that would be needed is changing the branch protection rules to require |
Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
I've updated the workflow to use |
Hi @norwd, thanks for your contribution! I really like the matrix to slim down the necessary code. I left two minor comments and as soon as they are resolved we can merge it, I'd say 😄 |
Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
* Extend selftest workflow to multiple runners This should help catch errors like #4 and #8 by ensuring that gotestfmt can run on all the major OS runners for GitHub Actions. Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com> * Separate windows step from *nix runners This allows `bash` and `pwsh` syntax to be used separately to avoid having to write the test as a polyglot 😬 Also added `secrets.GITHUB_TOKEN` as a fallback in case the repo secret `secrets.GH_TOKEN` is not set up, e.g. in a fork. Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com> * Remove `/tmp` directory for artifacts On MacOS, this results in: ``` Error: Provided rootDirectory /tmp is not a valid directory ``` On Windows this results in: ``` Error: No files were found with the provided path: /tmp/gotest.windows.log. No artifacts will be uploaded. ``` Both seem to be unhappy with `/tmp`, since the workspace is implicitly cleaned up at the end of the workflow, there shouldn't be a need to specify `/tmp`. Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com> * Name each workflow run of the matrix Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com> * Fix artifact path Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com> * Simplify workflow by just using bash universally Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com> Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
Please describe the change you are making
I'm condensing the existing
self-test
andself-test-macos
jobs into a single job that definesruns-on
with a matrix. I'm also adding windows to the OS list so that now there is also a test case for windows runners. This should help catch errors like #4 and #8 by ensuring that gotestfmt can run on all the major OS runners for GitHub Actions.Your code will be released under the MIT license. Are you in the position, and are you willing to release your code under this license?
Yup :)
Signed-off-by: Yuri Norwood 106889957+norwd@users.noreply.github.com