From 25d54390515d8da9c2862d6796664c6bd570f6ec Mon Sep 17 00:00:00 2001 From: aantoni Date: Thu, 8 Jan 2026 09:37:16 +0100 Subject: [PATCH 1/2] add continuous integration file --- .github/workflows/continuous-integration.yml | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/continuous-integration.yml diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..1c4b6e4 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,40 @@ +name: CI - Build and Test Service + +on: + push: + branches: + - main + pull_request: +jobs: + continuous-tests-go: + name: Test go + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Configure Go + uses: actions/setup-go@v6 + with: + go-version: "1.25" + + - name: Go Format + run: gofmt -s -w . && git diff --exit-code + + - name: Go Build + run: go build ./... + + - name: Go Vet + run: go vet ./... + + - name: golangci-lint + uses: golangci/golangci-lint-action@v9 + + - name: Test + run: go test -v -count=1 -race -shuffle=on -coverprofile=coverage.txt -json ./... > test.json + + - name: Annotate tests + if: always() + uses: guyarb/golang-test-annotations@v0.8.0 + with: + test-results: test.json \ No newline at end of file From d4c8e7cae5ed36423bb62684f9d4e8a00d71f822 Mon Sep 17 00:00:00 2001 From: aantoni Date: Thu, 8 Jan 2026 16:23:07 +0100 Subject: [PATCH 2/2] add go-version-file field for centralized go version retrieval --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 1c4b6e4..b0da3bf 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -16,7 +16,7 @@ jobs: - name: Configure Go uses: actions/setup-go@v6 with: - go-version: "1.25" + go-version-file: 'go.mod' - name: Go Format run: gofmt -s -w . && git diff --exit-code