-
Notifications
You must be signed in to change notification settings - Fork 6
/
action.yml
51 lines (43 loc) · 2 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: 'Leviathan Action'
description: 'Test your software directly on hardware using the Levaithan Testing framework'
runs:
using: "composite"
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3
- name: (Virtual) Leviathan build & test
working-directory: ${{ env.LEVIATHAN_ROOT }}/
if: env.WORKER_TYPE == 'qemu'
shell: bash
run: |
make config
make build
make local-test QEMU_SECUREBOOT=${QEMU_SECUREBOOT} FLASHER_SECUREBOOT=${FLASHER_SECUREBOOT}
- name: (Autokit) Leviathan build & test
working-directory: ${{ env.LEVIATHAN_ROOT }}/
if: env.WORKER_TYPE == 'testbot' || env.WORKER_TYPE == 'autokit'
shell: bash
run: |
make config
make build
make test
- name: Create Summary
shell: bash
run: |
echo "### ${TEST_SUITE} Test Report" >> $GITHUB_STEP_SUMMARY
echo "| Total Tests | Ran | Passed | Failed | Skipped |" >> $GITHUB_STEP_SUMMARY
echo "|-------|-----|---------|--------|--------|" >> $GITHUB_STEP_SUMMARY
jq -r '.[0].stats | "\(.tests) 📋 | \(.ran) 🏃 | \(.passed) ✅ | \(.failed) ❌ | \(.skipped) ⏭️"' ${REPORTS}/final-result.json >> $GITHUB_STEP_SUMMARY
echo "#### Failed Tests" >> $GITHUB_STEP_SUMMARY
jq -r '.[0].tests | to_entries[] | select(.value == "failed") | .key' ${REPORTS}/final-result.json >> $GITHUB_STEP_SUMMARY
echo "#### Skipped Tests" >> $GITHUB_STEP_SUMMARY
jq -r '.[0].tests | to_entries[] | select(.value == "skipped") | .key' ${REPORTS}/final-result.json >> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4
with:
name: reports-${{ env.WORKER_TYPE }}-${{ env.DEVICE_TYPE }}-${{ env.TEST_SUITE }}
path: ${{ env.REPORTS }}
- name: Teardown
shell: bash
working-directory: ${{ env.LEVIATHAN_ROOT }}
run: |
make down