diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a21a1782d..9d637e9e1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,19 +4,33 @@ on: workflow_dispatch: {} jobs: + list: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.list.outputs.matrix }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + - id: list + run: | + ls + go test ./tests/... -list=. + echo "matrix=$(go test ./tests/... -list=. | grep Test | jq -cnR '[inputs | select(length>0)]')" >> $GITHUB_OUTPUT test: runs-on: ubuntu-latest + needs: list strategy: + max-parallel: 5 matrix: - k8s-version: - - 1.24.10 + name: ${{ fromJson(needs.list.outputs.matrix) }} steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod - - run: make test + - run: make test -run="^${{ matrix.name }}$" env: AIVEN_TOKEN: ${{ secrets.AIVEN_TOKEN }} AIVEN_PROJECT_NAME: ${{ secrets.AIVEN_PROJECT_NAME }} - ENVTEST_K8S_VERSION: ${{ matrix.k8s-version }} diff --git a/Makefile b/Makefile index db8619eb5..d883f331a 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ endif IMG ?= aivenoy/aiven-operator:${IMG_TAG} IMG_TAG ?= $(shell git rev-parse HEAD) # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. -ENVTEST_K8S_VERSION = 1.24.2 +ENVTEST_K8S_VERSION ?= 1.24.10 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN))