Skip to content

fix(deps): update module github.com/prometheus/prometheus to v2 #10

fix(deps): update module github.com/prometheus/prometheus to v2

fix(deps): update module github.com/prometheus/prometheus to v2 #10

Workflow file for this run

name: build-push
on:
push:
workflow_dispatch:
jobs:
lint-test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6
with:
go-version-file: "go.mod"
- name: go mod tidy
run: |
go mod tidy
if ! git diff --exit-code go.mod go.sum; then
echo "Error: go.mod or go.sum is not tidy. Run 'go mod tidy' locally and commit the changes."
exit 1
fi
- name: golangci-lint
uses: golangci/golangci-lint-action@e7fa5ac41e1cf5b7d48e45e42232ce7ada589601 # v9
with:
version: latest
- name: Install dependencies
run: go get .
- run: go build
- name: unit test
run: go test -race -v ./...
- name: coverage
run: go test -v -coverprofile=coverage.out -covermode=atomic ./...
- name: upload coverage to codecov
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
with:
files: ./coverage.out
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run:
needs: [lint-test]
uses: libops/.github/.github/workflows/build-push-ghcr.yaml@main
permissions:
contents: read
packages: write
secrets: inherit