Skip to content

feat: explain a sync waiting on prune confirmation #1294

feat: explain a sync waiting on prune confirmation

feat: explain a sync waiting on prune confirmation #1294

Workflow file for this run

name: test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "**" ]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Setup Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: '1.25.x'
check-latest: true
- name: Cache Go build
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Check formatting (gofmt)
run: |
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "Files not gofmt-formatted:"
echo "$unformatted"
exit 1
fi
- name: Run staticcheck
run: go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 ./...
- name: Run tests (unit + e2e)
# Match parallelism to the runner's core count — full CPU
# utilisation, no oversubscription. Anything higher introduces
# "command bar not ready" flakes because the PTY subprocesses +
# mock servers + go test framework contend for CPU. GitHub bumped
# the default runner from 2 to 4 cores in 2024, so $(nproc) is
# the right call rather than hardcoding a number.
run: make test PARALLEL="$(nproc)"
- name: Upload e2e test snapshots
if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: e2e-test-snapshots
path: e2e/test-snapshots/
if-no-files-found: ignore