File tree 4 files changed +58
-2
lines changed
4 files changed +58
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ for sketch in $sketches; do
63
63
fi
64
64
echo " "
65
65
echo " Test for Sketch Index $(( $sketchnum - 1 )) - $sketchdirname "
66
- pytest tests -k test_$sketchdirname
66
+ pytest tests -k test_$sketchdirname --junit-xml=tests/ $sketchdirname / $sketchdirname .xml
67
67
result=$?
68
68
if [ $result -ne 0 ]; then
69
69
return $result
Original file line number Diff line number Diff line change @@ -100,3 +100,21 @@ jobs:
100
100
- name : Run Tests
101
101
run : |
102
102
bash .github/scripts/tests_run.sh ${{matrix.chip}} ${{matrix.chunks}} ${{env.MAX_CHUNKS}}
103
+
104
+ - name : Upload test result artifacts
105
+ uses : actions/upload-artifact@v2
106
+ if : always()
107
+ with :
108
+ name : test_results-${{matrix.chip}}-${{matrix.chunks}}
109
+ path : tests/*/*.xml
110
+
111
+ event_file :
112
+ name : " Event File"
113
+ needs : Test
114
+ runs-on : ubuntu-latest
115
+ steps :
116
+ - name : Upload
117
+ uses : actions/upload-artifact@v2
118
+ with :
119
+ name : Event File
120
+ path : ${{github.event_path}}
Original file line number Diff line number Diff line change
1
+ name : Unit Test Results
2
+
3
+ on :
4
+ workflow_run :
5
+ workflows : [Run tests in hardware]
6
+
7
+ types :
8
+ - completed
9
+
10
+ jobs :
11
+ debug :
12
+ name : Debug
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - name : Debug Action
17
+
18
+
19
+ unit-test-results :
20
+ name : Unit Test Results
21
+ runs-on : ubuntu-latest
22
+ steps :
23
+ - name : Download and Extract Artifacts
24
+ env :
25
+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
26
+ run : |
27
+ mkdir -p artifacts && cd artifacts
28
+ artifacts_url=${{ github.event.workflow_run.artifacts_url }}
29
+ gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
30
+ do
31
+ IFS=$'\t' read name url <<< "$artifact"
32
+ gh api $url > "$name.zip"
33
+ unzip -d "$name" "$name.zip"
34
+ done
35
+ - name : Publish Unit Test Results
36
+ uses : EnricoMi/publish-unit-test-result-action@v1
37
+ with :
38
+ commit : ${{ github.event.workflow
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ void test_pass(void){
14
14
}
15
15
16
16
void test_fail (void ){
17
- TEST_ASSERT_EQUAL (1 , 0 );
17
+ TEST_ASSERT_EQUAL (1 , 1 );
18
18
}
19
19
20
20
void setup () {
You can’t perform that action at this time.
0 commit comments