From b0395403ce2bbd13770f3615052a789443b985a1 Mon Sep 17 00:00:00 2001 From: Wilfried Roset Date: Thu, 20 Feb 2025 13:54:18 +0100 Subject: [PATCH 1/2] Add hashicorp/setup-terraform@v3 for the generate steps Signed-off-by: Wilfried Roset --- .github/workflows/test.yml | 97 +++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 49 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 26f04fc..4c7dc2b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,34 +2,33 @@ name: Tests on: pull_request: paths-ignore: - - 'README.md' + - "README.md" push: paths-ignore: - - 'README.md' + - "README.md" jobs: build: name: Build runs-on: ubuntu-latest timeout-minutes: 5 steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v3 - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version-file: 'go.mod' - cache: true - id: go + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version-file: "go.mod" + cache: true + id: go - - name: Get dependencies - run: | - go mod download + - name: Get dependencies + run: | + go mod download - - name: Build - run: | - go build -v . + - name: Build + run: | + go build -v . generate: runs-on: ubuntu-latest @@ -37,8 +36,9 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version-file: 'go.mod' + go-version-file: "go.mod" cache: true + - uses: hashicorp/setup-terraform@v3 - run: go generate ./... - name: git diff run: | @@ -61,43 +61,42 @@ jobs: # regularly on HashiCorp product pages for each HashiCorp product. # See: https://support.hashicorp.com/hc/en-us/articles/360021185113 terraform: - - '1.5.*' - - '1.6.*' + - "1.5.*" + - "1.6.*" # We will support the 3 last minor versions as Grafana honor 2 versions # before dropping a deprecated flag mimir: - - '2.11.0' - - '2.12.0' - - '2.13.0' + - "2.11.0" + - "2.12.0" + - "2.13.0" steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v3 - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version-file: 'go.mod' - cache: true - id: go + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version-file: "go.mod" + cache: true + id: go - - uses: hashicorp/setup-terraform@v2 - with: - terraform_version: ${{ matrix.terraform }} - terraform_wrapper: false + - uses: hashicorp/setup-terraform@v2 + with: + terraform_version: ${{ matrix.terraform }} + terraform_wrapper: false - - name: Get dependencies - run: | - go mod download + - name: Get dependencies + run: | + go mod download - # Not using `services` as they do not allow us to configure mimir and we - # don't want to build/maintain our own image just for that. - # The makefile will take care of spawning a mimir instance. - - name: TF acceptance tests - timeout-minutes: 10 - env: - TF_ACC: "1" - MIMIRTOOL_ADDRESS: "http://localhost:8080" - run: | - MIMIR_VERSION=${{ matrix.mimir }} make testacc + # Not using `services` as they do not allow us to configure mimir and we + # don't want to build/maintain our own image just for that. + # The makefile will take care of spawning a mimir instance. + - name: TF acceptance tests + timeout-minutes: 10 + env: + TF_ACC: "1" + MIMIRTOOL_ADDRESS: "http://localhost:8080" + run: | + MIMIR_VERSION=${{ matrix.mimir }} make testacc From 12e093fc5076c5326b58d994ed82c553575dfb75 Mon Sep 17 00:00:00 2001 From: Wilfried Roset Date: Thu, 20 Feb 2025 13:58:37 +0100 Subject: [PATCH 2/2] Update test matrix Signed-off-by: Wilfried Roset --- .github/workflows/test.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c7dc2b..89ccd65 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,14 +61,15 @@ jobs: # regularly on HashiCorp product pages for each HashiCorp product. # See: https://support.hashicorp.com/hc/en-us/articles/360021185113 terraform: - - "1.5.*" - - "1.6.*" + - "1.8.*" + - "1.9.*" + - "1.10.*" # We will support the 3 last minor versions as Grafana honor 2 versions # before dropping a deprecated flag mimir: - - "2.11.0" - - "2.12.0" - "2.13.0" + - "2.14.0" + - "2.15.0" steps: - name: Check out code into the Go module directory