Skip to content

Commit

Permalink
Styling of RISCOF reports
Browse files Browse the repository at this point in the history
Internal-tag: [#47914]
Signed-off-by: Maciej Kurc <[email protected]>
  • Loading branch information
mkurc-ant committed Nov 23, 2023
1 parent 9723579 commit 39365b2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/scripts/pytest/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,24 @@ a {
font-size: 20px;
font-weight: 700;
}

#environment {
color: #dfe1f1;
width: 100%;
}

#environment tr:nth-child(odd) {
background: none;
}

#environment td:first-child {
width: 25%;
}

#results-table {
color: #dfe1f1;
}

#yaml-table {
color: #dfe1f1;
}
4 changes: 3 additions & 1 deletion .github/scripts/pytest/style_pytest_report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ style_pytest_report(){

# Copy assets

mkdir -p ${DST_DIR}/assets
cp ${SRC_DIR}/assets/* ${DST_DIR}/assets/

# Add bar above h1.title
Expand All @@ -28,7 +29,8 @@ style_pytest_report(){

# Copy JS script to build dir

cp -r ${SRC_DIR}/script ${DST_DIR}
mkdir -p ${DST_DIR}/script
cp -r ${SRC_DIR}/script/* ${DST_DIR}/script/

echo -e "${COLOR_WHITE}Style pytest report ${COLOR_GREEN}SUCCEEDED${COLOR_CLEAR}"
echo -e "${COLOR_WHITE}========== style_pytest_report =========${COLOR_CLEAR}"
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/test-riscof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@ jobs:
mv riscof/coverage/coverage.info \
riscof/coverage/coverage_riscof_${{ matrix.coverage }}.info
- name: Prepare report
run: |
PYTEST_STYLE_SRC_DIR=${{ github.workspace }}/.github/scripts/pytest/
PYTEST_CSS=${PYTEST_STYLE_SRC_DIR}/css/styles.css
pushd riscof/riscof_work
bash ${PYTEST_STYLE_SRC_DIR}/style_pytest_report.sh ${PYTEST_STYLE_SRC_DIR} . report.html
echo "/* Custom CSS */" >>style.css
cat ${PYTEST_CSS} >>style.css
popd
- name: Pack artifacts
if: always()
uses: actions/upload-artifact@v3
Expand All @@ -161,3 +171,5 @@ jobs:
path: |
riscof/riscof_work/report.html
riscof/riscof_work/style.css
riscof/riscof_work/assets
riscof/riscof_work/script

0 comments on commit 39365b2

Please sign in to comment.