Skip to content

Commit 0646da0

Browse files
committed
go-makefile-maker
1 parent 9ebc2bf commit 0646da0

39 files changed

+1014
-545
lines changed

.dockerignore

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
1-
# SPDX-FileCopyrightText: Copyright 2024 SAP SE or an SAP affiliate company and cobaltcore-dev contributors
2-
#
1+
# SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company
32
# SPDX-License-Identifier: Apache-2.0
4-
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
5-
# Ignore build and test binaries.
6-
bin/
3+
4+
.DS_Store
5+
/*.env*
6+
/.dockerignore
7+
# TODO: uncomment when applications no longer use git to get version information
8+
#.git/
9+
/.github/
10+
/.gitignore
11+
/.golangci.yaml
12+
/.goreleaser.yml
13+
/.vscode/
14+
/CONTRIBUTING.md
15+
/Dockerfile
16+
/LICENSE*
17+
/Makefile.maker.yaml
18+
/README.md
19+
/build/
20+
/docs/
21+
/go.work
22+
/go.work.sum
23+
/report.html
24+
/shell.nix
25+
/testing/

.editorconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SPDX-FileCopyrightText: SAP SE or an SAP affiliate company
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
root = true
5+
6+
[*]
7+
insert_final_newline = true
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
indent_style = space
11+
indent_size = 2
12+
13+
[{Makefile,go.mod,go.sum,*.go}]
14+
indent_style = tab
15+
indent_size = unset
16+
17+
[*.md]
18+
trim_trailing_whitespace = false
19+
20+
[{LICENSE,LICENSES/*,vendor/**}]
21+
charset = unset
22+
end_of_line = unset
23+
indent_size = unset
24+
indent_style = unset
25+
insert_final_newline = unset
26+
trim_trailing_whitespace = unset

.envrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
# SPDX-FileCopyrightText: 2019–2020 Target
3+
# SPDX-FileCopyrightText: 2021 The Nix Community
4+
# SPDX-License-Identifier: Apache-2.0
5+
if type -P lorri &>/dev/null; then
6+
eval "$(lorri direnv)"
7+
elif type -P nix &>/dev/null; then
8+
use nix
9+
else
10+
echo "Found no nix binary. Skipping activating nix-shell..."
11+
fi

.github/renovate.json

Lines changed: 65 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,76 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
4-
"config:base"
4+
"config:recommended",
5+
"default:pinDigestsDisabled",
6+
"mergeConfidence:all-badges",
7+
"docker:disable"
58
],
69
"assignees": [
7-
"notandy"
10+
"notandy",
11+
"fwiesel",
12+
"mchristianl",
13+
"toanju"
14+
],
15+
"commitMessageAction": "Renovate: Update",
16+
"constraints": {
17+
"go": "1.25"
18+
},
19+
"dependencyDashboardOSVVulnerabilitySummary": "all",
20+
"osvVulnerabilityAlerts": true,
21+
"postUpdateOptions": [
22+
"gomodTidy",
23+
"gomodUpdateImportPaths"
824
],
925
"packageRules": [
1026
{
11-
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
12-
"automerge": true
27+
"matchPackageNames": [
28+
"/.*/"
29+
],
30+
"matchUpdateTypes": [
31+
"minor",
32+
"patch"
33+
],
34+
"groupName": "External dependencies"
35+
},
36+
{
37+
"matchPackageNames": [
38+
"/^github\\.com\\/sapcc\\/.*/"
39+
],
40+
"automerge": true,
41+
"groupName": "github.com/sapcc"
42+
},
43+
{
44+
"matchPackageNames": [
45+
"go",
46+
"golang",
47+
"actions/go-versions"
48+
],
49+
"groupName": "golang",
50+
"separateMinorPatch": true
51+
},
52+
{
53+
"matchPackageNames": [
54+
"go",
55+
"golang",
56+
"actions/go-versions"
57+
],
58+
"matchUpdateTypes": [
59+
"minor",
60+
"major"
61+
],
62+
"dependencyDashboardApproval": true
63+
},
64+
{
65+
"matchPackageNames": [
66+
"/^k8s.io\\//"
67+
],
68+
"allowedVersions": "0.28.x"
1369
}
1470
],
15-
"postUpdateOptions": [
16-
"gomodTidy"
17-
]
71+
"prHourlyLimit": 0,
72+
"schedule": [
73+
"before 8am on Friday"
74+
],
75+
"semanticCommits": "disabled"
1876
}

.github/workflows/checks.yaml

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,58 @@
1+
################################################################################
2+
# This file is AUTOGENERATED with <https://github.com/sapcc/go-makefile-maker> #
3+
# Edit Makefile.maker.yaml instead. #
4+
################################################################################
5+
6+
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company
7+
# SPDX-License-Identifier: Apache-2.0
8+
19
name: Checks
2-
on:
10+
"on":
311
push:
4-
tags:
5-
- v*
612
branches:
713
- main
814
pull_request:
9-
15+
branches:
16+
- '*'
17+
workflow_dispatch: {}
1018
permissions:
1119
checks: write
1220
contents: read
13-
1421
jobs:
1522
checks:
1623
name: Checks
1724
runs-on: ubuntu-latest
1825
steps:
1926
- name: Check out code
20-
uses: actions/checkout@v4
27+
uses: actions/checkout@v5
2128
- name: Set up Go
22-
uses: actions/setup-go@v5
23-
with:
24-
go-version-file: 'go.mod'
25-
- run: go mod edit -json | jq -r .Go | echo "GO_VERSION_FROM_PROJECT=$(cut -d' ' -f2)" >>${GITHUB_ENV}
26-
- name: Dependency Review
27-
uses: actions/dependency-review-action@v4
29+
uses: actions/setup-go@v6
2830
with:
29-
base-ref: ${{ github.event.pull_request.base.sha || 'main' }}
30-
deny-licenses: AGPL-1.0, AGPL-3.0, GPL-1.0, GPL-2.0, GPL-3.0, LGPL-2.0, LGPL-2.1, LGPL-3.0, BUSL-1.1
31-
fail-on-severity: moderate
32-
head-ref: ${{ github.event.pull_request.head.sha || github.ref }}
33-
- name: Run govulncheck
34-
uses: golang/govulncheck-action@v1
31+
check-latest: true
32+
go-version: 1.25.3
33+
- name: Run golangci-lint
34+
uses: golangci/golangci-lint-action@v8
3535
with:
36-
go-version-input: "${{ env.GO_VERSION_FROM_PROJECT }}"
36+
version: latest
37+
- name: Delete pre-installed shellcheck
38+
run: sudo rm -f $(which shellcheck)
39+
- name: Run shellcheck
40+
run: make run-shellcheck
41+
- name: Dependency Licenses Review
42+
run: make check-dependency-licenses
3743
- name: Check for spelling errors
3844
uses: reviewdog/action-misspell@v1
3945
with:
46+
exclude: ./vendor/*
4047
fail_on_error: true
4148
github_token: ${{ secrets.GITHUB_TOKEN }}
4249
ignore: importas
4350
reporter: github-check
4451
- name: Check if source code files have license header
45-
run: |
46-
shopt -s globstar
47-
go install github.com/google/addlicense@latest
48-
addlicense --check -- **/*.go
52+
run: make check-addlicense
53+
- name: REUSE Compliance Check
54+
uses: fsfe/reuse-action@v6
55+
- name: Install govulncheck
56+
run: go install golang.org/x/vuln/cmd/govulncheck@latest
57+
- name: Run govulncheck
58+
run: govulncheck -format text ./...

.github/workflows/ci.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
################################################################################
2+
# This file is AUTOGENERATED with <https://github.com/sapcc/go-makefile-maker> #
3+
# Edit Makefile.maker.yaml instead. #
4+
################################################################################
5+
6+
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company
7+
# SPDX-License-Identifier: Apache-2.0
8+
9+
name: CI
10+
"on":
11+
push:
12+
branches:
13+
- main
14+
paths-ignore:
15+
- '**.md'
16+
pull_request:
17+
branches:
18+
- '*'
19+
paths-ignore:
20+
- '**.md'
21+
workflow_dispatch: {}
22+
permissions:
23+
contents: read
24+
jobs:
25+
build:
26+
name: Build
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Check out code
30+
uses: actions/checkout@v5
31+
- name: Set up Go
32+
uses: actions/setup-go@v6
33+
with:
34+
check-latest: true
35+
go-version: 1.25.3
36+
- name: Build all binaries
37+
run: make build-all
38+
code_coverage:
39+
name: Code coverage report
40+
if: github.event_name == 'pull_request'
41+
needs:
42+
- test
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Check out code
46+
uses: actions/checkout@v5
47+
- name: Post coverage report
48+
uses: fgrosse/[email protected]
49+
with:
50+
coverage-artifact-name: code-coverage
51+
coverage-file-name: cover.out
52+
permissions:
53+
actions: read
54+
contents: read
55+
pull-requests: write
56+
test:
57+
name: Test
58+
needs:
59+
- build
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Check out code
63+
uses: actions/checkout@v5
64+
- name: Set up Go
65+
uses: actions/setup-go@v6
66+
with:
67+
check-latest: true
68+
go-version: 1.25.3
69+
- name: Run tests and generate coverage report
70+
run: make build/cover.out
71+
- name: Archive code coverage results
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: code-coverage
75+
path: build/cover.out

.github/workflows/codeql.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
################################################################################
2+
# This file is AUTOGENERATED with <https://github.com/sapcc/go-makefile-maker> #
3+
# Edit Makefile.maker.yaml instead. #
4+
################################################################################
5+
6+
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company
7+
# SPDX-License-Identifier: Apache-2.0
8+
9+
name: CodeQL
10+
"on":
11+
push:
12+
branches:
13+
- main
14+
pull_request:
15+
branches:
16+
- main
17+
schedule:
18+
- cron: '00 07 * * 1'
19+
workflow_dispatch: {}
20+
permissions:
21+
actions: read
22+
contents: read
23+
security-events: write
24+
jobs:
25+
analyze:
26+
name: CodeQL
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Check out code
30+
uses: actions/checkout@v5
31+
- name: Set up Go
32+
uses: actions/setup-go@v6
33+
with:
34+
check-latest: true
35+
go-version: 1.25.3
36+
- name: Initialize CodeQL
37+
uses: github/codeql-action/init@v4
38+
with:
39+
languages: go
40+
queries: security-extended
41+
- name: Autobuild
42+
uses: github/codeql-action/autobuild@v4
43+
- name: Perform CodeQL Analysis
44+
uses: github/codeql-action/analyze@v4

.github/workflows/go-test.yml

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

0 commit comments

Comments
 (0)