Make dependency checks offline-safe and guard the CI workflow with tests
scripts/check-deps.sh previously ran `go list -m all`, which fails with "module lookup disabled by GOPROXY=off" whenever the module cache does not hold the full module graph, even though the build only needs part of it. Read the pins with `go mod edit -json` instead: the online branch asks the module proxy about only the pinned modules, and the offline branch compares those pins with the newest versions in the module cache. Neither path loads the whole graph, and an empty cache is reported instead of failing. Run the dependency check from the single check job that already gates pull requests, so one action covers both the code/tests and dependency freshness. Add internal/ci tests that parse .gitea/workflows/ci.yml, fail if the workflow stops running on pull requests or stops invoking the check scripts, and fail if those scripts are not executable. Document the two-step job and the new mise tasks.
This commit is contained in:
1 parent
22e4c96192
commit
050936c6fd
5 files changed
+225
-47
No files matched your search
@@ -9,6 +9,7 @@ jobs:
|
||||
check:
|
||||
name: build and test
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -21,3 +22,6 @@ jobs:
|
||||
|
||||
- name: Run checks
|
||||
run: ./scripts/check.sh
|
||||
|
||||
- name: Check dependency freshness
|
||||
run: ./scripts/check-deps.sh
|
||||
Reference in new issue
Block a user