diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..6bcc37d --- /dev/null +++ b/.gitea/workflows/test.yml @@ -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 ./...