From ff0cb03eea00a02c23590ec2ef54ef30f2e59104 Mon Sep 17 00:00:00 2001 From: Eric Lin Date: Mon, 15 Jul 2024 13:56:50 +0000 Subject: [PATCH] Add CI build and unit-test for prometheus-to-sd --- .github/workflows/ci.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bd74b4f96..ecf4193d1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -53,3 +53,38 @@ jobs: run: | cd custom-metrics-stackdriver-adapter make build + ci-unit-tests-prometheus-to-sd: + name: ci-unit-tests-prometheus-to-sd + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + id: go + + - name: Unit tests + run: | + cd prometheus-to-sd + make test + + ci-build-prometheus-to-sd: + name: ci-build-prometheus-to-sd + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + id: go + + - name: Build + run: | + cd prometheus-to-sd + make build