diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 26b20125..9297d5a8 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -29,10 +29,12 @@ jobs: - name: Checkout Repository uses: actions/checkout@v6 - - name: Install lcov - run: | - sudo apt-get update - sudo apt-get install -y lcov + - name: Install dependencies + uses: eclipse-score/apt-install@main + with: + packages: lcov fakechroot + cache: false + - name: Setup Bazel uses: bazel-contrib/setup-bazel@0.18.0 @@ -48,7 +50,7 @@ jobs: --test_output=errors \ --nocache_test_results \ --config=x86_64-linux \ - //src/... + //src/... //tests/... - name: Generate HTML Coverage Report shell: bash @@ -66,6 +68,16 @@ jobs: name: ${{ github.event.repository.name }}_cpp_coverage_report path: cpp_coverage/ retention-days: 10 + + - name: Upload test logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: bazel-testlogs-cpp + path: | + bazel-testlogs/**/test.xml + bazel-testlogs/**/test.log + retention-days: 10 rust: runs-on: ubuntu-latest steps: @@ -104,3 +116,26 @@ jobs: name: ${{ github.event.repository.name }}_rust_coverage_report path: ${{ env.COVERAGE_DIR }} retention-days: 10 + + - name: Upload test logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: bazel-testlogs-rust + path: | + bazel-testlogs/**/test.xml + bazel-testlogs/**/test.log + retention-days: 10 + + merge-testlogs: + needs: [cpp, rust] + if: always() + runs-on: ubuntu-latest + steps: + - name: Merge test log artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: bazel-testlogs + pattern: bazel-testlogs-* + delete-merged: true + retention-days: 10 diff --git a/.github/workflows/test_and_docs.yml b/.github/workflows/test_and_docs.yml index d413f8de..b0a97b64 100644 --- a/.github/workflows/test_and_docs.yml +++ b/.github/workflows/test_and_docs.yml @@ -20,15 +20,9 @@ permissions: id-token: write on: - pull_request_target: - types: [opened, reopened, synchronize] # Allows forks to trigger the docs build - push: - branches: - - main - merge_group: - types: [checks_requested] - release: - types: [created] + workflow_run: + workflows: ["Code Coverage"] + types: [completed] jobs: docs-verify: @@ -38,17 +32,26 @@ jobs: contents: read with: bazel-docs-verify-target: "//:docs_check" - run-tests: - uses: eclipse-score/cicd-workflows/.github/workflows/tests.yml@main - permissions: - contents: read - pull-requests: read - with: - bazel-target: 'test //src/... //tests/... --config=x86_64-linux' - upload-name: 'bazel-testlogs' + fetch-testlogs: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + - name: Download test logs from Code Coverage run + uses: actions/download-artifact@v4 + with: + name: bazel-testlogs + path: bazel-testlogs + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Re-upload test logs for docs build + uses: actions/upload-artifact@v4 + with: + name: bazel-testlogs + path: bazel-testlogs/ + retention-days: 10 build-docs: - needs: run-tests - if: ${{ always() }} + needs: fetch-testlogs + if: ${{ github.event.workflow_run.conclusion == 'success' }} uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@main permissions: contents: write diff --git a/tests/integration/smoke/smoke.py b/tests/integration/smoke/smoke.py index 75fd6e5b..923634aa 100644 --- a/tests/integration/smoke/smoke.py +++ b/tests/integration/smoke/smoke.py @@ -16,9 +16,16 @@ format_logs, ) from pathlib import Path +from attribute_plugin import add_test_properties +@add_test_properties( + partially_verifies=[], + test_type="interface-test", + derivation_technique="explorative-testing", +) def test_smoke(): + """Smoke test for the launch manager daemon.""" code, stdout, stderr = get_common_interface().run_until_file_deployed( "src/launch_manager_daemon/launch_manager" )