1 Commits

Author SHA1 Message Date
769361f967 chore(deps): update go modules
Some checks failed
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 2m2s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Has been cancelled
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Has been cancelled
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Has been cancelled
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Has been cancelled
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 1m49s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 1m30s
Lint Markdown files / Run markdown linter (pull_request) Successful in 21s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Failing after 10m7s
2025-09-05 16:16:34 +00:00
8 changed files with 17 additions and 32 deletions

View File

@@ -20,10 +20,10 @@ jobs:
go: [ stable ]
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
steps:
- uses: actions/checkout@v5.0.0
- uses: actions/setup-go@v6.0.0
- uses: actions/checkout@v4.3.0
- uses: actions/setup-go@v5.5.0
with:
go-version: ${{ matrix.go }}
- uses: golangci/golangci-lint-action@v8.0.0
with:
version: v2.6.0 # renovate: datasource=github-releases depName=golangci/golangci-lint
version: v2.4.0 # renovate: datasource=github-releases depName=golangci/golangci-lint

View File

@@ -33,25 +33,10 @@ jobs:
go: [ stable ]
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
steps:
- uses: actions/checkout@v5.0.0
- uses: actions/setup-go@v6.0.0
- uses: actions/checkout@v4.3.0
- uses: actions/setup-go@v5.5.0
with:
go-version: ${{ matrix.go }}
- env:
GOPROXY: ${{ vars.GOPROXY }}
run: make test/unit
- id: coverage
name: Check coverage
run: |
coverage="$(make test/coverage | grep total | awk '{ print substr($3, 1, length($3)-1); }')"
echo "total_coverage=$coverage" >> $GITHUB_OUTPUT
echo "Total coverage: ${coverage}%"
- name: Fail if coverage is to low
run: |
threshold=5
total_coverage=${{ steps.coverage.outputs.total_coverage }}
if (( ${total_coverage%.*} < ${threshold} )); then
echo "ERROR: Coverage (${total_coverage}%) is below the threshold (${threshold}%)." 1>&2
exit 1
fi

View File

@@ -13,7 +13,7 @@ jobs:
name: "Run markdown linter"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5.0.0
- uses: actions/checkout@v4.3.0
- uses: DavidAnson/markdownlint-cli2-action@v20.0.0
with:
globs: '**/*.md'

View File

@@ -12,12 +12,12 @@ jobs:
name: "Release application"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5.0.0
- uses: actions/checkout@v4.3.0
- uses: docker/setup-qemu-action@v3.6.0
- uses: actions/setup-go@v6.0.0
- uses: actions/setup-go@v5.5.0
with:
go-version: stable
- uses: docker/login-action@v3.6.0
- uses: docker/login-action@v3.5.0
with:
registry: git.cryptic.systems
username: ${{ github.repository_owner }}
@@ -28,7 +28,7 @@ jobs:
GOPROXY: ${{ vars.GOPROXY }}
uses: goreleaser/goreleaser-action@v6.4.0
with:
version: v2.12.7 # renovate: datasource=github-releases depName=goreleaser/goreleaser
version: v2.11.2 # renovate: datasource=github-releases depName=goreleaser/goreleaser
args: release --clean
sync-to-hub-docker-io:

View File

@@ -11,8 +11,8 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v5.0.0
- uses: peter-evans/dockerhub-description@v5.0.0
- uses: actions/checkout@v4.3.0
- uses: peter-evans/dockerhub-description@v4.0.2
with:
username: ${{ secrets.DOCKER_IO_USERNAME }}
password: ${{ secrets.DOCKER_IO_PASSWORD }}

2
.gitignore vendored
View File

@@ -1,3 +1,3 @@
prometheus-fail2ban-exporter
coverage.*
coverage.txt
dist

View File

@@ -40,7 +40,7 @@ PHONY+=test/unit
test/unit:
CGO_ENABLED=0 \
GOPROXY=$(shell go env GOPROXY) \
go test -v -p 1 -coverprofile=coverage.out -covermode=count -timeout 1200s ./...
go test -v -p 1 -coverprofile=coverage.txt -covermode=count -timeout 1200s ./...
PHONY+=test/integration
test/integration:
@@ -49,10 +49,10 @@ test/integration:
go test -v -p 1 -count=1 -timeout 1200s ./it/...
PHONY+=test/coverage
test/coverage:
test/coverage: test/unit
CGO_ENABLED=0 \
GOPROXY=$(shell go env GOPROXY) \
go tool cover -func=coverage.out
go tool cover -html=coverage.txt
# GOLANGCI-LINT
# ==============================================================================

2
go.mod
View File

@@ -2,7 +2,7 @@ module git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter
go 1.23.0
toolchain go1.25.3
toolchain go1.25.1
require (
github.com/alecthomas/kong v1.12.1