Skip to content

Commit

Permalink
Fix: merging coverage includes plugin tests.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Nov 11, 2024
1 parent 62f1f5f commit 5aeb5da
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5aeb5da

Please sign in to comment.