From 9c1caa1f4d4ef3cf4822e73ff11c4ce4e4dbe847 Mon Sep 17 00:00:00 2001 From: Austin Valle Date: Thu, 18 Apr 2024 09:01:49 -0400 Subject: [PATCH] remove suffix from wildcard for coverage file --- .github/workflows/ci-go.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-go.yml b/.github/workflows/ci-go.yml index 007d5e3c5..66f989337 100644 --- a/.github/workflows/ci-go.yml +++ b/.github/workflows/ci-go.yml @@ -42,8 +42,14 @@ jobs: - run: go test -coverprofile=coverage.out ./... env: TF_ACC: "1" + # Remove .* suffix, if it exists, from the terraform version + - id: tf_version + run: + version="${{ matrix.terraform }}" + wildcard=".*" + echo "version=$(echo ${version%$wildcard})" >> "$GITHUB_OUTPUT" - run: go tool cover -html=coverage.out -o coverage.html - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: - name: go-${{ matrix.go-version }}-terraform-${{ matrix.terraform }}-coverage + name: go-${{ matrix.go-version }}-terraform-${{ steps.tf_version.outputs.version }}-coverage path: coverage.html