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.
28 lines
498 B
YAML
28 lines
498 B
YAML
name: ci
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
check:
|
|
name: build and test
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: false
|
|
|
|
- name: Run checks
|
|
run: ./scripts/check.sh
|
|
|
|
- name: Check dependency freshness
|
|
run: ./scripts/check-deps.sh
|