Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 24 additions & 41 deletions .github/workflows/push.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
---
on: push
name: Build and test
name: Build
permissions:
contents: write
contents: read
jobs:
generated:
name: Check generated code is up to date
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup Go
uses: arnested/setup-go@rc
with:
go-version-file: go.mod
- name: go mod tidy
run: |
go mod tidy
git diff --exit-code
uses: geomys/sandboxed-step@v1.2.1
with:
run: |
go mod tidy
git diff --exit-code
- name: go generate
run: |
go generate -x
git diff --exit-code
build_and_test:
name: Build and test
uses: geomys/sandboxed-step@v1.2.1
with:
run: |
go generate -x
git diff --exit-code
snapshot:
name: Snapshot
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Go
uses: arnested/setup-go@rc
with:
Expand All @@ -42,18 +49,11 @@ jobs:
run: |
go fmt ./...
git diff --exit-code
- name: Test
uses: robherley/go-test-action@v1.0.1
with:
testArguments: -race -shuffle=on -benchtime=1x -cover -covermode=atomic -coverprofile=coverage.txt ./...
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Install changelog management tool
run: go install github.com/goreleaser/chglog/cmd/chglog@main
- name: Build changelog
run: chglog init
uses: geomys/sandboxed-step@v1.2.1
with:
persist-workspace-changes: 'true'
run: go tool chglog init
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
Expand All @@ -70,29 +70,12 @@ jobs:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Go
uses: arnested/setup-go@rc
with:
go-version-file: go.mod
- name: Install nilaway
run: go install go.uber.org/nilaway/cmd/nilaway@latest
- name: Run nilaway
run: nilaway ./...

license_check:
name: License check
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Setup Go
uses: arnested/setup-go@rc
uses: geomys/sandboxed-step@v1.2.1
with:
go-version-file: go.mod
- name: Install wwhrd
run: go install github.com/frapposelli/wwhrd@latest
- name: go mod vendor
env:
GO111MODULE: 'on'
run: go mod vendor
- name: wwhrd check
run: wwhrd check
run: go tool nilaway ./...
28 changes: 20 additions & 8 deletions .github/workflows/go-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: arnested/go-version-action@v2
id: go-version
with:
Expand All @@ -22,9 +24,14 @@ jobs:
uses: arnested/setup-go@rc
with:
go-version: ${{ steps.go-version.outputs.latest }}
- run: go mod edit -go ${{ steps.go-version.outputs.latest }}
- run: go fix ./...
- run: git diff
- name: Apply Go version bump
uses: geomys/sandboxed-step@v1.2.1
with:
persist-workspace-changes: 'true'
run: |
go mod edit -go ${{ steps.go-version.outputs.latest }}
go fix ./...
git diff
- name: "Create pull request"
uses: peter-evans/create-pull-request@v8
with:
Expand All @@ -45,6 +52,8 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: arnested/go-version-action@v2
id: go-version-stable
with:
Expand All @@ -65,12 +74,15 @@ jobs:
uses: arnested/setup-go@rc
with:
go-version: ${{ steps.go-version-unstable.outputs.latest }}
- run: go mod edit -go ${{ steps.go-version-unstable.outputs.latest }}
if: steps.go-version-unstable.outputs.latest != steps.go-version-stable.outputs.latest
- run: go fix ./...
if: steps.go-version-unstable.outputs.latest != steps.go-version-stable.outputs.latest
- run: git diff
- name: Apply unstable Go version bump
if: steps.go-version-unstable.outputs.latest != steps.go-version-stable.outputs.latest
uses: geomys/sandboxed-step@v1.2.1
with:
persist-workspace-changes: 'true'
run: |
go mod edit -go ${{ steps.go-version-unstable.outputs.latest }}
go fix ./...
git diff
- name: "Create pull request"
uses: peter-evans/create-pull-request@v8
with:
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Release
on:
workflow_run:
workflows: ["Build and test"]
workflows: ["Build"]
branches: [main]
types:
- completed
Expand All @@ -15,6 +15,7 @@ jobs:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- uses: arnested/go-version-action@v2
id: go-version
- name: Bump version and push tag
Expand All @@ -32,12 +33,13 @@ jobs:
go-version-file: go.mod
- name: go version
run: go version
- name: run go install to warm proxy.go.dev
run: go install ${{ steps.go-version.outputs.module }}@${{ steps.version.outputs.tag }}
- name: Install changelog management tool
run: go install github.com/goreleaser/chglog/cmd/chglog@main
- name: Build changelog
run: chglog init
- name: Warm proxy.go.dev and build changelog
uses: geomys/sandboxed-step@v1.2.1
with:
persist-workspace-changes: 'true'
run: |
go install ${{ steps.go-version.outputs.module }}@${{ steps.version.outputs.tag }}
go tool chglog init
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
Expand Down Expand Up @@ -85,7 +87,10 @@ jobs:
- name: Add favicons to GitHub Pages
run: cp -vR page/favicons site/
- name: Add changelog to GitHub Pages
run: chglog format --template deb --output site/changelog
uses: geomys/sandboxed-step@v1.2.1
with:
persist-workspace-changes: 'true'
run: go tool chglog format --template deb --output site/changelog
- name: Deploy deb packages
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
push:
branches: [main]
schedule:
- cron: '0 15 * * 0'
- cron: '22 10 * * *'

permissions:
contents: read
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Test
on:
push:
pull_request:
schedule:
- cron: '22 10 * * *'
workflow_dispatch:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
go:
- go-version: stable
- go-version-file: go.mod
deps:
- locked
- latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup Go
uses: arnested/setup-go@rc
with:
go-version: ${{ matrix.go.go-version }}
go-version-file: ${{ matrix.go.go-version-file }}
- name: Test
uses: geomys/sandboxed-step@v1.2.1
with:
persist-workspace-changes: 'true'
run: |
if [ "${{ matrix.deps }}" = "latest" ]; then
go get -u -t ./...
fi
go test -race -shuffle=on -v -cover -covermode=atomic -coverprofile=coverage.txt ./...
- name: Check test coverage
if: matrix.go.go-version-file == 'go.mod' && matrix.deps == 'locked'
uses: geomys/sandboxed-step@v1.2.1
with:
run: go tool go-test-coverage --config=./.testcoverage.yml --github-action-output
12 changes: 12 additions & 0 deletions .testcoverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
profile: coverage.txt
local-prefix: ldddns.arnested.dk

threshold:
file: 0
package: 0
total: 35

exclude:
paths:
- ^internal/log/logtest/
10 changes: 0 additions & 10 deletions .wwhrd.yml

This file was deleted.

66 changes: 66 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,87 @@ require (
)

require (
dario.cat/mergo v1.0.1 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.5.0 // indirect
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
github.com/ProtonMail/go-crypto v1.1.6 // indirect
github.com/alexflint/go-arg v1.6.0 // indirect
github.com/alexflint/go-scalar v1.2.0 // indirect
github.com/aws/aws-sdk-go v1.49.4 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cloudflare/circl v1.6.3 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/cyphar/filepath-securejoin v0.6.1 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.9.0 // indirect
github.com/go-git/go-git/v5 v5.19.1 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/google/go-github/v82 v82.0.0 // indirect
github.com/google/go-querystring v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/goreleaser/chglog v0.7.5-0.20260522080709-9e21853032a6 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.18.6 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/narqo/go-badge v0.0.0-20230821190521-c9a75c019a59 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pjbgf/sha1cd v0.6.0 // indirect
github.com/rs/zerolog v1.35.1 // indirect
github.com/sagikazarmark/locafero v0.11.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/skeema/knownhosts v1.3.1 // indirect
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/cobra v1.10.2 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/spf13/viper v1.21.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/vladopajic/go-test-coverage/v2 v2.18.8 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
gitlab.com/digitalxero/go-conventional-commit v1.0.7 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect
go.uber.org/nilaway v0.0.0-20260515015210-fd187751154f // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.51.0 // indirect
golang.org/x/image v0.38.0 // indirect
golang.org/x/mod v0.36.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/text v0.37.0 // indirect
golang.org/x/tools v0.45.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

tool (
github.com/goreleaser/chglog/cmd/chglog
github.com/vladopajic/go-test-coverage/v2
go.uber.org/nilaway/cmd/nilaway
)
Loading
Loading