From f58c6a185949ecd49c6a7faebc66ed197178fbb2 Mon Sep 17 00:00:00 2001 From: Jens Fischer Date: Wed, 7 Feb 2024 07:40:03 +0100 Subject: [PATCH] test: Add go-test workflow --- .github/workflows/go-test.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/go-test.yml diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 0000000..ece2591 --- /dev/null +++ b/.github/workflows/go-test.yml @@ -0,0 +1,38 @@ +# Copyright 2024 Deutsche Telekom IT GmbH +# +# SPDX-License-Identifier: Apache-2.0 + +name: Go Test + +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + + services: + docker: + image: docker:20.10.12-dind + ports: + - 2375:2375 + - 9094:9094 + - 27017:27017 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.21 + + - name: Run go test + env: + KAFKA_HOST: localhost:9094 + KAFKA_IMAGE: bitnami/kafka + KAFKA_TAG: 3.4.1 + MONGO_HOST: localhost:27017 + MONGO_IMAGE: mongo + MONGO_TAG: 7.0.5-rc0 + run: go test -v ./... \ No newline at end of file