feat(init): bundle Prometheus + fix OpenCost RBAC (follow-up to #21) #51
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |