Add basic Github action workflow to run checks - #5
Conversation
The tests of this library currently do not pass. It seems upstream developpers didn't care to run the testsuite after making changes, leading to a lot of tests failing. To prevent this situation, it is good to run the build and tests on each push and pull requests to master. This commits adds a very basic GitHub actions workflow for go projects. The composites check of go vet is ignored as the tests make a heavy use of unkeyed struct fields, which leaded to a lot of "struct literal uses unkeyed fields" warnings that are not that important since the package comes from the same repository.
|
See the kind of (currently failing) workflow this produces on my fork: https://github.com/n-peugnet/secret-detector/actions/runs/22065946922/job/63757679095 |
|
@n-peugnet We completely missed this! Sorry. Looking into your PR now. |
defangdevs
left a comment
There was a problem hiding this comment.
Reviewed the workflow for safety: triggers only on push/pull_request to main, no pull_request_target, no secrets used, default (least-privilege) GITHUB_TOKEN permissions. Ran the same steps locally (build, test, go vet -composites=false, go fmt) against main + #4 + #6 combined — all green. Good addition; this repo had no CI at all before.
Thank you! While you are at it, it would be good if you could tag a release after you merge the opened PRs, even a v0 release would be better than nothing. |
I understand that you probably did not intend to take over upstream development in this fork, but as the previous upstream archived their repository, your fork becomes the most up to date version of this library.
As docker-compose now depends on your fork, I am currently packaging your library in Debian, and noticed that the testsuite does not pass.
It seems upstream developers didn't care to run the testsuite after making changes, leading to a lot of tests failing.
To prevent this situation, it is good to run the build and tests on each push and pull requests to master.
This commits adds a very basic GitHub actions workflow for go projects.
The composites check of go vet is ignored as the tests make a heavy use of unkeyed struct fields, which leaded to a lot of "struct literal uses unkeyed fields" warnings that are not that important since the package comes from the same repository.
As a follow-up, I will send you some patches that fix most of the test failures, but for a few of them, I did not manage to find an easy solution yet. I will try to run
git bisectto find where these few last failing tests stopped passing.