From 19e43bdb1a4590946a53725ad0a2e548ee05ebe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Thu, 17 Aug 2023 13:21:50 +0200 Subject: [PATCH] fix: run vault tests based on secondary db usage (#699) --- .github/workflows/common-e2e.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/common-e2e.yml b/.github/workflows/common-e2e.yml index fc5db6af8..7ffb890e4 100644 --- a/.github/workflows/common-e2e.yml +++ b/.github/workflows/common-e2e.yml @@ -54,8 +54,17 @@ jobs: - name: Wait for server to start run: docker/is-available.sh http://localhost:3123 $(pwd)/logs + - name: Define if vaults are enabled based on secondary db enabled parameter + id: vaults + run: | + if [ "${{ matrix.secondary_db_enabled }}" = "true" ]; then + echo "vault-tests=enabled" >> $GITHUB_OUTPUT + else + echo "vault-tests=disabled" >> $GITHUB_OUTPUT + fi + - name: Run E2E Test Suite - run: yarn dlx mocha-headless-chrome --timeout 1800000 -f http://localhost:9001/mocha/test.html + run: yarn dlx mocha-headless-chrome --timeout 1800000 -f http://localhost:9001/mocha/test.html?vaults=${{ steps.vaults.outputs.vault-tests }}} - name: Show logs on failure if: ${{ failure() }} @@ -157,8 +166,17 @@ jobs: - name: Wait for server to start run: for i in {1..30}; do curl -s http://localhost:3123/healthcheck && break || sleep 1; done + - name: Define if vaults are enabled based on secondary db enabled parameter + id: vaults + run: | + if [ "${{ matrix.secondary_db_enabled }}" = "true" ]; then + echo "vault-tests=enabled" >> $GITHUB_OUTPUT + else + echo "vault-tests=disabled" >> $GITHUB_OUTPUT + fi + - name: Run E2E Test Suite - run: yarn dlx mocha-headless-chrome --timeout 1800000 -f http://localhost:9001/mocha/test.html + run: yarn dlx mocha-headless-chrome --timeout 1800000 -f http://localhost:9001/mocha/test.html?vaults=${{ steps.vaults.outputs.vault-tests }}} - name: Show logs on failure if: ${{ failure() }}