diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..f2d78f7 --- /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