The check job now runs on the archie-quality self-hosted runner under an
unprivileged user, so the sudo apt-get install and sudo sysctl steps fail,
exactly as the deploy gate did before 3b372b4a. Both are host provisioning:
ripgrep is installed on the runner host and the userns restriction belongs in
sysctl.d. The namespace check stays, without sudo.
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
name: Quality
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: quality-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: archie-quality
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
# ripgrep and the unprivileged-userns sysctl are provisioned on the host.
|
|
# A self-hosted runner should not need sudo, and installing a package on
|
|
# every run is not the gate's job.
|
|
- name: Verify unprivileged user namespaces
|
|
run: unshare --user --map-root-user --net true
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
package_json_file: ui/package.json
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "24"
|
|
|
|
- name: Install quality tools
|
|
run: |
|
|
go install github.com/go-task/task/v3/cmd/task@v3.48.0
|
|
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(cat .golangci-version)
|
|
go install mvdan.cc/gofumpt@v0.11.0
|
|
bash tools/proto.sh install
|
|
|
|
- name: Ensure contract baseline ref
|
|
run: |
|
|
if ! git show-ref --verify --quiet refs/heads/main; then
|
|
git branch main origin/main
|
|
fi
|
|
|
|
- name: Run definitive gate
|
|
run: |
|
|
task --concurrency 1 check
|
|
git diff --exit-code
|