Skip to content

Commit

Permalink
chore: post failure report only when failure scenarios exist
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo committed Feb 13, 2025
1 parent 2ad8c6c commit 6b3842b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/BuildAndRun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,17 @@ jobs:
shell: bash

- name: Scenario test (optional)
id: optional-scenario-test
run: |
source install/setup.bash
source install/local_setup.bash
# execute scenarios but ignore the return code
./src/scenario_simulator_v2/.github/workflows/workflow.sh ./src/scenario_simulator_v2/test_runner/scenario_test_runner/config/optional_workflow.txt global_frame_rate:=20 || true
echo failure=$(grep -c "<failure" /tmp/scenario_workflow/optional_workflow/failure_report.md) >> $GITHUB_OUTPUT
shell: bash

- uses: actions/github-script@v7
if: steps.optional-scenario-test.outputs.failure > 0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down

0 comments on commit 6b3842b

Please sign in to comment.