Skip to content

refactor!: remove the per-backend capability gating (#128) #254

refactor!: remove the per-backend capability gating (#128)

refactor!: remove the per-backend capability gating (#128) #254

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
# Force JavaScript-based actions onto Node.js 24 ahead of the
# 2026-06-02 default flip; silences the Node 20 deprecation banner.
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.25"
cache: true
- uses: golangci/golangci-lint-action@v9
with:
# Pinned exact (not v2.5). Keep in sync with Makefile
# GOLANGCI_LINT_VERSION.
version: v2.5.0
test-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ["1.25", "1.26"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
cache: true
- run: go vet ./...
- run: go test -race -count=1 ./...
test-integration-linux:
runs-on: ubuntu-latest
needs: [lint, test-linux]
strategy:
fail-fast: false
matrix:
go: ["1.25", "1.26"]
shard: [1, 2, 3]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
cache: true
- name: Verify Docker available
run: |
docker version
docker compose version
- name: Run integration tests (shard ${{ matrix.shard }}/3)
env:
SHARD_INDEX: ${{ matrix.shard }}
SHARD_TOTAL: 3
run: |
# Enumerate tests under the integration tag, partition them
# deterministically by sorted-index modulo SHARD_TOTAL, and
# run only this shard's subset. Platform-specific tests are
# excluded here by their build constraints.
set -euo pipefail
tests=$(go test -tags=integration -list '.*' ./test/integration/... \
| grep -E '^Test' | sort -u)
if [ -z "$tests" ]; then
echo "no integration tests discovered" >&2
exit 1
fi
selected=$(echo "$tests" | awk -v s="$SHARD_INDEX" -v t="$SHARD_TOTAL" \
'{ if ((NR - 1) % t == (s - 1)) print }')
echo "Shard ${SHARD_INDEX}/${SHARD_TOTAL} will run:"
echo "$selected"
pattern="^($(echo "$selected" | paste -sd '|' -))$"
go test -race -count=1 -tags=integration -timeout=15m \
-run "$pattern" ./test/integration/...