From 94d1ef63ae1ad0a56d724e436a3bfadfaad67b1e Mon Sep 17 00:00:00 2001 From: brokenpip3 Date: Mon, 13 Nov 2023 00:06:09 +0100 Subject: [PATCH] fix bats action --- .github/workflows/auto-tests-bats.yaml | 14 ++++++++------ test/bats/test_helper.bash | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/auto-tests-bats.yaml b/.github/workflows/auto-tests-bats.yaml index b51154581..abd839c5c 100644 --- a/.github/workflows/auto-tests-bats.yaml +++ b/.github/workflows/auto-tests-bats.yaml @@ -44,13 +44,13 @@ jobs: - name: Ensure Golang runtime dependencies run: make go-dependencies - - name: Setup BATS - uses: mig4/setup-bats@v1 + - name: Setup Bats and libs + uses: brokenpip3/setup-bats-libs@1.5.2 with: - bats-version: 1.9.0 - - - name: Setup Bats libs - uses: brokenpip3/setup-bats-libs@0.1.0 + support-path: "${{ github.workspace }}/.bats/bats-support" + assert-path: "${{ github.workspace }}/.bats/bats-assert" + detik-path: "${{ github.workspace }}/.bats/bats-detik" + file-path: "${{ github.workspace }}/.bats/bats-file" - name: Kind setup uses: helm/kind-action@v1.5.0 @@ -58,4 +58,6 @@ jobs: cluster_name: ${{env.KIND_CLUSTER_NAME}} - name: Jenkins Operator - bats tests + env: + BATS_LIB_PATH: "${{ github.workspace }}/.bats" run: make bats-tests diff --git a/test/bats/test_helper.bash b/test/bats/test_helper.bash index 0fde73fa6..bb5da0b30 100644 --- a/test/bats/test_helper.bash +++ b/test/bats/test_helper.bash @@ -1,5 +1,5 @@ _common_setup() { - export BATS_LIB_PATH="/usr/lib/" + export BATS_LIB_PATH="${BATS_LIB_PATH}:/usr/lib" bats_load_library bats-support bats_load_library bats-assert bats_load_library bats-file