From 095a4b226c7ebbbfea0c4891b6488bce51e1be69 Mon Sep 17 00:00:00 2001 From: dblock Date: Mon, 11 Nov 2024 14:34:38 -0500 Subject: [PATCH] Fix: merging coverage includes plugin tests. Signed-off-by: dblock --- .github/workflows/test-spec.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-spec.yml b/.github/workflows/test-spec.yml index 3729b66cb..1408a1ee8 100644 --- a/.github/workflows/test-spec.yml +++ b/.github/workflows/test-spec.yml @@ -77,12 +77,16 @@ jobs: working-directory: tests/${{ matrix.entry.tests || 'default' }} run: docker compose up -d + - name: Generate Test Files Hash + id: tests + run: echo "hash=${{ matrix.entry.version }}-${{ hashFiles(format('tests/{0}', matrix.entry.tests || 'default')) }} >> $GITHUB_OUTPUT + - name: Run Tests run: | npm run test:spec -- \ --opensearch-insecure \ --opensearch-version=${{ matrix.entry.version }} \ - --coverage coverage/test-spec-coverage-${{ matrix.entry.version }}-${{ matrix.entry.tests || 'default' }}.json \ + --coverage coverage/test-spec-coverage-${{ steps.tests.outputs.hash }}.json \ --tests=tests/${{ matrix.entry.tests || 'default' }} - name: Get Container Logs @@ -96,8 +100,8 @@ jobs: - name: Upload Test Coverage Results uses: actions/upload-artifact@v4 with: - name: coverage-${{ matrix.entry.version }}-${{ hashFiles(format('tests/{0}', matrix.entry.tests || 'default')) }} - path: coverage/test-spec-coverage-${{ matrix.entry.version }}-${{ matrix.entry.tests || 'default' }}.json + name: coverage-${{ matrix.entry.version }}-${{ steps.tests.outputs.hash }} + path: coverage/test-spec-coverage-${{ steps.tests.outputs.hash }}.json merge-coverage: runs-on: ubuntu-latest