Skip to content

feat(gateway): real throughput-based load metric (conn. intel 2) #13

feat(gateway): real throughput-based load metric (conn. intel 2)

feat(gateway): real throughput-based load metric (conn. intel 2) #13

Workflow file for this run

name: ci-gateway
# Go CI for the CumulusVPN gateway.
on:
push:
branches: [main]
paths:
- 'gateway/**'
- '.github/workflows/ci-gateway.yml'
pull_request:
paths:
- 'gateway/**'
- '.github/workflows/ci-gateway.yml'
permissions:
contents: read
concurrency:
group: ci-gateway-${{ github.ref }}
cancel-in-progress: true
jobs:
gateway:
name: build & test
runs-on: ubuntu-latest
defaults:
run:
working-directory: gateway
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Go
uses: actions/setup-go@v7
with:
go-version: '1.25'
cache-dependency-path: gateway/go.sum
# gofmt is authoritative; fail the build if anything is unformatted.
- name: gofmt
run: |
unformatted="$(gofmt -l .)"
if [ -n "$unformatted" ]; then
echo "::error::These files are not gofmt-clean:"
echo "$unformatted"
exit 1
fi
echo "gofmt: clean"
- name: go vet
run: go vet ./...
- name: go build
run: go build ./...
- name: go test (race + coverage)
run: go test ./... -race -covermode=atomic -coverprofile=coverage.out
- name: Coverage summary
run: go tool cover -func=coverage.out | tail -1
# Optional deeper static analysis; advisory only so it never blocks a merge.
golangci:
name: golangci-lint (advisory)
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Go
uses: actions/setup-go@v7
with:
go-version: '1.25'
cache-dependency-path: gateway/go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
# v8 installs golangci-lint v2 (built with a current Go toolchain, so it
# can analyze our `go 1.25` target — v1.64.x was built with go1.24 and
# errored "language version go1.24 < targeted 1.25"). --no-config runs
# the default (standard) linters without a v2 config file; advisory job,
# so --issues-exit-code=0 keeps the check green while still annotating.
version: latest
working-directory: gateway
args: --no-config --issues-exit-code=0