From 6e1b96900f8e5b7202ca635b1e9ba05204f6fec7 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Tue, 7 Jan 2025 17:53:24 +0200 Subject: Added formatting check to CI and broke formatting on purpose --- .github/workflows/ci.yml | 7 +++++-- cmd/server/main.go | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fff1768..bd7984d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: branches: [master] jobs: - tests: + ci: name: Tests runs-on: ubuntu-latest @@ -20,5 +20,8 @@ jobs: with: go-version: "1.23.2" + - name: Format code + run: test -z $(go fmt ./...) + - name: Run tests - run: go test ./... + run: go test --cover ./... diff --git a/cmd/server/main.go b/cmd/server/main.go index fa04d69..c02f65d 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -16,7 +16,7 @@ import ( const port = 7223 -func main() { +func main(){ stdout := flag.Bool("stdout", false, "enable logging to stdout") flag.Parse() -- cgit v1.3.1