Skip to content

Commit dfd6d3d

Browse files
committed
workflows: switch test job to lava-action@v8
lava-action@v8 provides the following features: - use lava_token for retrieving job results and logs. This allows to submit "personal" jobs where it's important to protect secrets (i.e. wifi passwords) - allow to save results with fixed file name. This change ensures that there is a clean set of results in case some test jobs have to be restarted. - add flag for Incomplete and Canceled jobs to not be considered "failures". This allows to produce full test report that is included in the PR comment even in case produced build doesn't boot on the hardware. Signed-off-by: Milosz Wasilewski <[email protected]>
1 parent d497c54 commit dfd6d3d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,29 @@ jobs:
5050
DEVICE_TYPE_PATH="${FIND_PATH%/*}"
5151
DEVICE_TYPE="${DEVICE_TYPE_PATH#*/}"
5252
BUILD_DOWNLOAD_URL="${{inputs.url}}"
53+
FILE_NAME=$(echo "${FIND_PATH%.yaml}" | tr "/" "-")
5354
sed -i "s|{{DEVICE_TYPE}}|${DEVICE_TYPE}|g" "${{ matrix.target }}"
5455
sed -i "s|{{GITHUB_SHA}}|${GITHUB_SHA}|g" "${{ matrix.target }}"
5556
sed -i "s|{{BUILD_DOWNLOAD_URL}}|${BUILD_DOWNLOAD_URL}|g" "${{ matrix.target }}"
5657
sed -i "s|{{GITHUB_RUN_ID}}|${GITHUB_RUN_ID}|g" "${{ matrix.target }}"
5758
cat "${{ matrix.target }}"
59+
echo "JOB_NAME=${FILE_NAME}" >> $GITHUB_ENV
5860
5961
- name: Submit ${{ matrix.target }}
6062
timeout-minutes: 20
61-
uses: foundriesio/lava-action@v6
63+
uses: foundriesio/lava-action@v8
64+
env:
65+
JOB_NAME: ${{ env.JOB_NAME }}
6266
with:
6367
lava_token: ${{ secrets.LAVATOKEN }}
6468
lava_url: 'lava.infra.foundries.io'
6569
job_definition: ${{ matrix.target }}
6670
wait_for_job: true
6771
fail_action_on_failure: false
72+
fail_action_on_incomplete: false
6873
save_result_as_artifact: true
6974
save_job_details: true
75+
result_file_name: "${{ env.JOB_NAME }}"
7076

7177
publish-test-results:
7278
name: "Publish Tests Results"

0 commit comments

Comments
 (0)