ci: add gitea actions test workflow (vet, gofmt, test, build)
This commit is contained in:
1 parent
33b97a50ea
commit
fa4f193be2
1 file changed
+30
@@ -0,0 +1,30 @@
|
||||
name: test
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Go einrichten
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: go vet
|
||||
run: go vet ./...
|
||||
- name: gofmt-Check
|
||||
run: |
|
||||
unformatted=$(gofmt -l .)
|
||||
if [ -n "$unformatted" ]; then
|
||||
echo "Folgende Dateien sind nicht gofmt-formatiert:"
|
||||
echo "$unformatted"
|
||||
exit 1
|
||||
fi
|
||||
- name: go test
|
||||
run: go test ./...
|
||||
- name: go build
|
||||
run: go build ./...
|
||||
Reference in new issue
Block a user