chore: pin crdb version for unit tests (#7260)

* chore: pin crdb version for unit tests

* use latest 23.1 version

* use latest available 23.1 version
This commit is contained in:
Livio Spring
2024-01-18 09:16:54 +01:00
committed by GitHub
parent af4e0484d0
commit 8470649ecb
4 changed files with 7 additions and 3 deletions

View File

@@ -48,6 +48,7 @@ jobs:
go_version: "1.21" go_version: "1.21"
core_cache_key: ${{ needs.core.outputs.cache_key }} core_cache_key: ${{ needs.core.outputs.cache_key }}
core_cache_path: ${{ needs.core.outputs.cache_path }} core_cache_path: ${{ needs.core.outputs.cache_path }}
crdb_version: "23.1.13"
core-integration-test: core-integration-test:
needs: core needs: core

View File

@@ -12,6 +12,9 @@ on:
core_cache_path: core_cache_path:
required: true required: true
type: string type: string
crdb_version:
required: false
type: string
jobs: jobs:
test: test:
@@ -51,7 +54,7 @@ jobs:
- -
name: test name: test
if: ${{ steps.cache.outputs.cache-hit != 'true' }} if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: make core_unit_test run: export ZITADEL_CRDB_VERSION="${{ inputs.crdb_version }}" && make core_unit_test
- -
name: publish coverage name: publish coverage
uses: codecov/codecov-action@v3.1.4 uses: codecov/codecov-action@v3.1.4

View File

@@ -27,7 +27,7 @@ var (
) )
func TestMain(m *testing.M) { func TestMain(m *testing.M) {
ts, err := testserver.NewTestServer() ts, err := testserver.NewTestServer(testserver.CustomVersionOpt(os.Getenv("ZITADEL_CRDB_VERSION")))
if err != nil { if err != nil {
logging.WithFields("error", err).Fatal("unable to start db") logging.WithFields("error", err).Fatal("unable to start db")
} }

View File

@@ -20,7 +20,7 @@ var (
) )
func TestMain(m *testing.M) { func TestMain(m *testing.M) {
ts, err := testserver.NewTestServer() ts, err := testserver.NewTestServer(testserver.CustomVersionOpt(os.Getenv("ZITADEL_CRDB_VERSION")))
if err != nil { if err != nil {
logging.WithFields("error", err).Fatal("unable to start db") logging.WithFields("error", err).Fatal("unable to start db")
} }