From 0eabecda2d3d927ace169d1bebd65ce52dd410d4 Mon Sep 17 00:00:00 2001 From: Maciej Kurc Date: Thu, 23 Nov 2023 14:24:02 +0100 Subject: [PATCH] Styling of RISCOF reports Internal-tag: [#47914] Signed-off-by: Maciej Kurc --- .github/scripts/pytest/css/styles.css | 21 +++++++++++++++++++++ .github/workflows/test-riscof.yml | 12 ++++++++++++ 2 files changed, 33 insertions(+) diff --git a/.github/scripts/pytest/css/styles.css b/.github/scripts/pytest/css/styles.css index efbc991a8c0..0143defafcf 100644 --- a/.github/scripts/pytest/css/styles.css +++ b/.github/scripts/pytest/css/styles.css @@ -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; +} diff --git a/.github/workflows/test-riscof.yml b/.github/workflows/test-riscof.yml index d9545ea5554..21eaf9a12b5 100644 --- a/.github/workflows/test-riscof.yml +++ b/.github/workflows/test-riscof.yml @@ -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 @@ -161,3 +171,5 @@ jobs: path: | riscof/riscof_work/report.html riscof/riscof_work/style.css + riscof/riscof_work/assets + riscof/riscof_work/script