-
Notifications
You must be signed in to change notification settings - Fork 12
75 lines (63 loc) · 2.06 KB
/
check_results.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Copyright (c) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Check Results
# Either a daily based on schedule/cron or only on tag push
on: pull_request
jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
# - name: install-pkgs
#run: |
# sudo apt-get install -y ninja-build doxygen
- name: cache-pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-test-pip
- name: install-pip
run: |
pip3 install wheel setuptools GitPython
pip3 install junit2html
- id: file_changes
uses: trilom/[email protected]
with:
output: 'json'
- name: Check results
id: results
run: |
latest=$(scripts/version_mgr.py -L)
echo ::set-output name=version::${latest};
echo "Latest is ${latest}";
# check if we have the board already, just in case, WIP
for file in `cat $HOME/files_added.json | jq -r '.[] '`; do
if [[ ${file} == results/*sanitycheck* ]]; then
echo "File ${file} not allowed."
exit 1
fi
if [[ ${file} == results/* ]]; then
echo "Verifying content of ${file}"
fd=$(dirname $file)
v=$(basename $fd)
max_size=10
max_err=500
echo "python3 scripts/results_verification.py -Z ${v} -P ./${file} -E ${max_err} -F ${max_err} -S ${max_size}"
python3 scripts/results_verification.py -Z ${v} -P ./${file} -E ${max_err} -F ${max_err} -S ${max_size}
if [ $? -eq 0 ]
then
echo "Results file succesfully verified"
else
echo "Results file verification failed"
exit 1
fi
fi
if [[ ${file} == results/* ]]; then
echo "Checking ${file}"
~/.local/bin/junit2html --summary-matrix ${file}
fi
done
# verify matching test spec
# verify version
# etc.