diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7dc8b642aa629..13c99313d61b2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,4 @@ +name: 'CI' on: push: branches: @@ -148,13 +149,23 @@ jobs: run: | make -j4 -C tools/lkl ${{ matrix.build_options }} - name: Tests - run: mkdir /tmp/junit && make -C tools/lkl run-tests tests="--junit-dir /tmp/junit" + run: mkdir junit && make -C tools/lkl run-tests tests="--junit-dir ../../junit" - name: Save test results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: success() || failure() with: name: test-results-${{ matrix.displayTargetName }} - path: /tmp/junit/*.xml + path: junit/*.xml + + event_file: + name: "Event File" + runs-on: ubuntu-latest + steps: + - name: Upload + uses: actions/upload-artifact@v5 + with: + name: Event File + path: ${{ github.event_path }} checkpatch: runs-on: ubuntu-24.04 diff --git a/.github/workflows/tests-results.yml b/.github/workflows/tests-results.yml new file mode 100644 index 00000000000000..94b1e6a3fe8f2e --- /dev/null +++ b/.github/workflows/tests-results.yml @@ -0,0 +1,36 @@ +name: Test Results + +on: + workflow_run: + workflows: ["CI"] + types: + - completed +permissions: {} + +jobs: + test-results: + name: Test Results + runs-on: ubuntu-latest + if: github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'failure' + permissions: + # for creating checks + checks: write + # for posting comments on PRs + pull-requests: write + # for accessing artifacts + actions: read + contents: read + steps: + - name: Download and Extract Artifacts + uses: actions/download-artifact@v5 + with: + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + commit: ${{ github.event.workflow_run.head_sha }} + event_file: Event File/event.json + event_name: ${{ github.event.workflow_run.event }} + files: "*/*.xml" diff --git a/tools/lkl/tests/boot.sh b/tools/lkl/tests/boot.sh index 61c6b30add3309..e82860388db779 100755 --- a/tools/lkl/tests/boot.sh +++ b/tools/lkl/tests/boot.sh @@ -4,5 +4,5 @@ script_dir=$(cd $(dirname ${BASH_SOURCE:-$0}); pwd) source $script_dir/test.sh lkl_test_plan 1 "boot" -lkl_test_run 1 +lkl_test_run 1 true lkl_test_exec $script_dir/boot diff --git a/tools/lkl/tests/run.py b/tools/lkl/tests/run.py index d013362cf97648..a39b674be63ab5 100755 --- a/tools/lkl/tests/run.py +++ b/tools/lkl/tests/run.py @@ -138,7 +138,7 @@ def end(self, obj): except: log = "" - jt = TestCase(t.description, elapsed_sec=secs, stdout=log) + jt = TestCase(t.description, elapsed_sec=secs, stdout=log, classname=s.name) if t.result == 'skip': jt.add_skipped_info(output=log) elif t.result == 'not ok':