Skip to content

Commit fa0b9bc

Browse files
committed
ci: add Woodpecker CI configuration for Codeberg
1 parent 520e9b0 commit fa0b9bc

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ docs/user/reference/cli/*.md
3232
.*
3333

3434
# But allow specific dotfiles we want to track
35-
!.github
35+
!.github/
36+
!.woodpecker/
3637
!.gitignore
3738
!.goreleaser.yml
3839
!docs/user/.vitepress/

.woodpecker/ci.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
when:
2+
- event: [push, pull_request, manual]
3+
4+
steps:
5+
test:
6+
image: golang:1-alpine
7+
commands:
8+
- apk add --no-cache git make
9+
- make tidy
10+
- |
11+
if [ -n "$(git status --porcelain)" ]; then
12+
echo "Go mod tidy changed files"
13+
git diff
14+
exit 1
15+
fi
16+
- make test
17+
18+
lint:
19+
image: golang:1-alpine
20+
commands:
21+
- apk add --no-cache git make
22+
- make install-golangci-lint
23+
- make lint
24+
25+
security:
26+
image: golang:1-alpine
27+
commands:
28+
- apk add --no-cache git make
29+
- go install golang.org/x/vuln/cmd/govulncheck@latest
30+
- govulncheck ./...
31+
32+
build-linux-amd64:
33+
image: golang:1-alpine
34+
depends_on: [test, lint, security]
35+
commands:
36+
- apk add --no-cache git make
37+
- make build
38+
- mv bin/stackaroo stackaroo-linux-amd64
39+
40+
integration-test:
41+
image: golang:1-alpine
42+
depends_on: [build-linux-amd64]
43+
commands:
44+
- ./stackaroo-linux-amd64 --help
45+
- ./stackaroo-linux-amd64 --version
46+
- ./stackaroo-linux-amd64 deploy --help
47+
48+
final-status:
49+
image: alpine:latest
50+
depends_on: [test, lint, security, build-linux-amd64, integration-test]
51+
commands:
52+
- echo "✅ All CI checks passed!"

0 commit comments

Comments
 (0)