31 lines
654 B
YAML
31 lines
654 B
YAML
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 ./...
|