Skip to content

Merge pull request #20 from mayur-tolexo/feat/cost-guardrail #47

Merge pull request #20 from mayur-tolexo/feat/cost-guardrail

Merge pull request #20 from mayur-tolexo/feat/cost-guardrail #47

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
build-test:
runs-on: ubuntu-latest
env:
GOFLAGS: -mod=mod
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.26"
cache: true
- name: Deps
run: go mod download
- name: Vet
run: go vet ./...
- name: gofmt
run: test -z "$(gofmt -l . | grep -v vendor/)" || (gofmt -l . && exit 1)
- name: Test
run: go test -race -coverprofile=coverage.out ./...
lint:
runs-on: ubuntu-latest
env:
GOFLAGS: -mod=mod
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.26"
cache: true
# golangci-lint v2 is required: it parses our v2 .golangci.yml and is built with a Go
# toolchain new enough for the module's go 1.26 directive (v1 builds use go1.24 and fail
# with "Go language version used to build golangci-lint is lower than the targeted Go
# version"). The v8 action installs v2 releases.
- uses: golangci/golangci-lint-action@v8
with:
version: v2.12.2