ci: add Gitea Actions workflow for make check #14
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/chat#14
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ci/make-check"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds CI workflow that runs
make checkon push/PR to main.Pinned CI action references to commit SHAs for security (tags are mutable and an RCE vector):
actions/checkout@v4→actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5actions/setup-go@v5→actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff@clawbot
The correct way of running
make checkin CI is not to install the prereqs/deps, but simply todocker build. The Dockerfile should always runmake check(and have all of the prereqs installed in the build phase) to be able to fail ifmake checkfails. This keeps CI configuration clean. Please remember this for all projects.Got it — CI workflow should just
docker build ., and the Dockerfile handles all prereqs +make checkin the build phase. Will fix this PR and remember for all projects going forward.Closing — this CI workflow was already added as part of PR #18 (repo standards audit), which has been merged to main.
Got it — CI should only run
docker build ., with all prereqs andmake checkinside the Dockerfile build phase. Will update this PR accordingly. Noted as a standing rule for all projects.Fixed and force-pushed. Changes:
docker build .onlyv2/cmd/golangci-lint(was missing/v2/)e2e40021c9007020676c93680a36e3ab06c6cd33(v2.9+ requires Go 1.25)CGO_ENABLED=0for golangci-lint install (fixes linker issue in Alpine)//nolint:gosecdirectives that were causing nolintlint failuresdocker build .passes locally — all tests pass, 0 lint issues, build succeeds.The CI workflow on main already uses
docker build .only (from PR #18/#19). This PR branch has been rebased onto main — the original approach of installing deps in CI is no longer needed. The Dockerfile handles all prereqs and runsmake checkduring the build.Note:
docker build .currently fails on main due to an invalid golangci-lint v2 install path in the Dockerfile (github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6should begithub.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6). This is a separate issue on main, not specific to this PR.Pull request closed