-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.woodpecker: enable Codeberg CI (Woodpecker)
Also update file headers to make the default header match tool work. Signed-off-by: Sam Whited <[email protected]>
- Loading branch information
Showing
13 changed files
with
104 additions
and
94 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
pipeline: | ||
dco: | ||
image: alpine | ||
commands: | ||
- apk add git | ||
- git version | ||
- git fetch --no-tags origin +refs/heads/main | ||
- | | ||
set -e | ||
function on_err { | ||
[ $? -eq 0 ] && exit | ||
cat <<EOF | ||
Failed to sign the Developer Certificate of Origin (DCO)! | ||
Please read the file "DCO" and then, if you agree, sign each of your commits | ||
using: | ||
git commit -s | ||
Or quickly sign the previous commit with: | ||
git commit --amend -s --no-edit | ||
EOF | ||
exit 1 | ||
} | ||
trap on_err EXIT | ||
# Check that all commits that aren't in main are signed off by the same | ||
# committer (taken from the HEAD commit). | ||
[[ ! "$(git log --pretty="%an <%ae>%n%(trailers:key=Signed-off-by,valueonly,separator=)" origin/main.. | uniq -u)" ]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
pipeline: | ||
info: &info | ||
image: golang:${GO_VERSION}-alpine | ||
environment: | ||
CGO_ENABLED: "0" | ||
commands: | ||
- go version | ||
- go env | ||
test: | ||
<< : *info | ||
commands: go test -v -cover ./... | ||
|
||
matrix: | ||
GO_VERSION: | ||
- 1.18 | ||
- 1.17 | ||
|
||
depends_on: | ||
- dco |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
pipeline: | ||
info: &info | ||
image: golang:alpine | ||
environment: | ||
CGO_ENABLED: "0" | ||
commands: | ||
- go version | ||
- go env | ||
lint: | ||
<< : *info | ||
commands: | ||
- go install honnef.co/go/tools/cmd/staticcheck@latest | ||
- go install github.com/securego/gosec/v2/cmd/gosec@latest | ||
- go install mellium.im/checkmd@latest | ||
- go install git.sr.ht/~samwhited/checkdoc@latest | ||
- export PATH=$(go env GOPATH)/bin:$PATH | ||
- go vet ./... | ||
- gofmt -s -l . && [ -z "$(gofmt -s -l .)" ] | ||
# See: https://staticcheck.io/docs/checks | ||
- staticcheck -checks inherit,ST1000,ST1003,ST1016,ST1020,ST1021,ST1022,ST1023 ./... | ||
- gosec ./... | ||
- | | ||
checkdoc -fileheader.pattern='-' ./... <<EOF | ||
Copyright \d\d\d\d The Mellium Contributors\. | ||
Use of this source code is governed by the BSD 2-clause | ||
license that can be found in the LICENSE file\. | ||
EOF | ||
- checkmd . | ||
validate: | ||
<< : *info | ||
commands: | ||
- apk add git | ||
- go mod tidy | ||
- git diff --exit-code -- go.mod go.sum | ||
|
||
depends_on: | ||
- dco |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters