Skip to content

Commit 800b36d

Browse files
authored
Merge pull request #315 from arnested/misc
Update CI and release builds
2 parents 71fc835 + 1d00c2a commit 800b36d

File tree

13 files changed

+245
-253
lines changed

13 files changed

+245
-253
lines changed

.github/actionlint.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
paths:
3+
.github/workflows/**/*.{yml,yaml}:
4+
ignore:
5+
- 'shellcheck reported issue in this script: SC1083:.+'

.github/dependabot.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1+
---
12
version: 2
23
updates:
3-
- package-ecosystem: github-actions
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
time: '04:00'
8-
timezone: Europe/Copenhagen
9-
open-pull-requests-limit: 10
10-
- package-ecosystem: gomod
11-
directory: "/"
12-
schedule:
13-
interval: daily
14-
time: '04:00'
15-
timezone: Europe/Copenhagen
16-
open-pull-requests-limit: 10
17-
- package-ecosystem: docker
18-
directory: "/"
19-
schedule:
20-
interval: daily
21-
time: '04:00'
22-
timezone: Europe/Copenhagen
23-
open-pull-requests-limit: 10
4+
- package-ecosystem: github-actions
5+
directory: "/"
6+
schedule:
7+
interval: daily
8+
time: '04:00'
9+
timezone: Europe/Copenhagen
10+
open-pull-requests-limit: 10
11+
- package-ecosystem: gomod
12+
directory: "/"
13+
schedule:
14+
interval: daily
15+
time: '04:00'
16+
timezone: Europe/Copenhagen
17+
open-pull-requests-limit: 10
18+
- package-ecosystem: docker
19+
directory: "/"
20+
schedule:
21+
interval: daily
22+
time: '04:00'
23+
timezone: Europe/Copenhagen
24+
open-pull-requests-limit: 10

.github/workflows/build.yml

Lines changed: 42 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,49 @@
1-
on:
2-
- push
1+
---
2+
on: push
33
name: Build and test
44
permissions:
5-
contents: read
5+
contents: write
66
jobs:
7-
go-version:
8-
name: Lookup go versions
7+
build_and_test:
8+
name: Build and test
99
runs-on: ubuntu-24.04
10-
outputs:
11-
minimal: ${{ steps.go-version.outputs.minimal }}
12-
matrix: ${{ steps.go-version.outputs.matrix }}
1310
steps:
14-
- uses: actions/checkout@v6
15-
- uses: arnested/go-version-action@v1
16-
id: go-version
17-
go_generate:
18-
name: Check generated code is up to date
19-
needs: go-version
11+
- uses: actions/checkout@v6
12+
with:
13+
fetch-depth: 0
14+
- name: Setup Go
15+
uses: actions/setup-go@v6
16+
with:
17+
go-version-file: go.mod
18+
- name: Run go test
19+
uses: robherley/[email protected]
20+
with:
21+
testArguments: -race -cover -covermode=atomic -coverprofile=coverage.txt ./...
22+
- name: Install changelog management tool
23+
run: go install github.com/goreleaser/chglog/cmd/chglog@main
24+
- name: Build changelog
25+
run: chglog init
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
- name: Run GoReleaser
31+
uses: goreleaser/goreleaser-action@v6
32+
with:
33+
args: release --snapshot
34+
35+
nilaway:
36+
name: Nilaway
2037
runs-on: ubuntu-24.04
2138
steps:
22-
- uses: actions/checkout@v6
23-
- name: Install Go ${{ needs.go-version.outputs.minimal }}
24-
uses: actions/setup-go@v6
25-
with:
26-
go-version: ${{ needs.go-version.outputs.minimal }}
27-
- run: go version
28-
- name: go generate
29-
env:
30-
GO111MODULE: 'on'
31-
run: go generate -x
32-
- name: Diff after go generate
33-
run: git diff --exit-code
34-
build_and_test:
35-
name: Build and test
36-
needs: go-version
37-
runs-on: macos-latest
38-
strategy:
39-
matrix:
40-
go-version: ${{ fromJSON(needs.go-version.outputs.matrix) }}
41-
steps:
42-
- uses: actions/checkout@v6
43-
- name: Install Go ${{ matrix.go-version }}
44-
uses: actions/setup-go@v6
45-
with:
46-
go-version: ${{ matrix.go-version }}.x
47-
- run: go version
48-
- name: go test
49-
env:
50-
GO111MODULE: 'on'
51-
# We enable cgo to be able to test with `-race`.
52-
CGO_ENABLED: 1
53-
run: go test -v -race -cover -covermode=atomic -coverprofile=coverage.txt ./...
54-
- name: Upload coverage report to Codecov
55-
uses: codecov/codecov-action@v5
56-
with:
57-
flags: go${{ matrix.go-version }}
39+
- uses: actions/checkout@v6
40+
with:
41+
fetch-depth: 0
42+
- name: Setup Go
43+
uses: actions/setup-go@v6
44+
with:
45+
go-version-file: go.mod
46+
- name: Install nilaway
47+
run: go install go.uber.org/nilaway/cmd/nilaway@latest
48+
- name: Run nilaway
49+
run: nilaway ./...

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: 'Dependency Review'
23
on: [pull_request]
34

.github/workflows/docker-image-security-scan.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1+
---
12
name: Lint
23
on: pull_request
34

45
permissions:
56
contents: read
67

78
jobs:
9+
actionlint:
10+
runs-on: ubuntu-24.04
11+
steps:
12+
- uses: actions/checkout@v6
13+
- uses: reviewdog/action-actionlint@v1
14+
815
dockerfile:
916
name: dockerfile
1017
runs-on: ubuntu-24.04
@@ -19,9 +26,9 @@ jobs:
1926
name: markdown
2027
runs-on: ubuntu-24.04
2128
steps:
22-
- uses: actions/checkout@v6
23-
- name: Run markdownlint
24-
uses: DavidAnson/markdownlint-cli2-action@v22
29+
- uses: actions/checkout@v6
30+
- name: Run markdownlint
31+
uses: DavidAnson/markdownlint-cli2-action@v22
2532

2633
golangci:
2734
name: lint
@@ -40,3 +47,13 @@ jobs:
4047
with:
4148
version: latest
4249
only-new-issues: true
50+
51+
yamllint:
52+
name: Yamllint
53+
runs-on: ubuntu-24.04
54+
steps:
55+
- uses: actions/checkout@v6
56+
- name: Run Yamllint
57+
uses: frenck/[email protected]
58+
with:
59+
strict: true

0 commit comments

Comments
 (0)