Skip to content

Commit

Permalink
ci: help test fail gracefully
Browse files Browse the repository at this point in the history
fixes `FileNotFoundError` when no ros logs are found in path, this is a
side effect of failing at a previous step with a non-complete build

Originally found here https://github.com/PX4/PX4-Autopilot/actions/runs/12020668911/job/33509701241?pr=24039#step:15:13
  • Loading branch information
mrpollo committed Nov 26, 2024
1 parent d7b1e1e commit 4bfe36e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/mavros_mission_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ jobs:

- name: Upload logs to flight review
if: always()
run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg
run: |
mkdir ~/.ros/log/log
touch ~/.ros/log/log/log.ulg
touch ~/.ros/log/*/*.ulg
./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg
- name: Upload px4 binary
if: failure()
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/mavros_offboard_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ jobs:

- name: Upload logs to flight review
if: always()
run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg
run: |
mkdir ~/.ros/log/log
touch ~/.ros/log/log/log.ulg
touch ~/.ros/log/*/*.ulg
./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg
- name: Upload px4 binary
if: failure()
Expand Down

0 comments on commit 4bfe36e

Please sign in to comment.