diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 31ea1171d..cb2628064 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,7 @@ name: Run Bazel Tests on: pull_request: types: [opened, reopened, synchronize] + workflow_call: jobs: code: runs-on: ubuntu-latest @@ -39,3 +40,24 @@ jobs: run: | bazel run //:ide_support bazel test //src/... + + - name: Prepare bundled consumer report + if: always() + run: | + # 1. Create the target directory + mkdir -p tests-report + + # 2. Sync the testlogs to our artifact folder + # We use -L to follow the symlink and --include filters + # to only grab the actual results (XMLs and Logs) + rsync -amL --include='*/' --include='test.xml' --include='test.log' --exclude='*' bazel-testlogs/ tests-report/ + + # 3. Optional: If your tool prefers the folder name to match the Consumer Tests + # you can rename specific subfolders here, but rsync preserves the package paths. + + - name: Upload bundled consumer report + if: always() + uses: actions/upload-artifact@v4 + with: + name: tests-report + path: tests-report diff --git a/.github/workflows/test_and_docs.yml b/.github/workflows/test_and_docs.yml index 542bc6da9..c52438950 100644 --- a/.github/workflows/test_and_docs.yml +++ b/.github/workflows/test_and_docs.yml @@ -38,13 +38,13 @@ jobs: bazel-docs-verify-target: "//:docs_check" # This is the user configurable part of the workflow - consumer-tests: - uses: ./.github/workflows/consumer_test.yml + unit-tests: + uses: ./.github/workflows/test.yml secrets: inherit docs-build: # Waits for consumer-tests but run only when docs verification succeeded - needs: [docs-verify, consumer-tests] + needs: [docs-verify, unit-tests] if: ${{ always() && needs.docs-verify.result == 'success' }} uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@main permissions: