Skip to content

feat: bulk fetch (F) + core test suite & CI #5

feat: bulk fetch (F) + core test suite & CI

feat: bulk fetch (F) + core test suite & CI #5

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
test:
name: Test & Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Verify formatting
run: |
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "These files are not gofmt-formatted:"
echo "$unformatted"
exit 1
fi
- name: Vet
run: go vet ./...
- name: Test (race + coverage)
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Coverage summary
run: go tool cover -func=coverage.out | tail -n 1
lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: golangci-lint
# v9 supports golangci-lint v2 (correct /v2 module path for goinstall).
uses: golangci/golangci-lint-action@v9
with:
# Pinned for reproducible runs — bump deliberately, not on every push.
version: v2.12.2
# Build golangci-lint with the repo's Go toolchain so it can analyze
# the targeted Go version (prebuilt binaries lag behind new releases).
install-mode: goinstall