Create Test Reports #661
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Create Test Reports' | |
on: | |
workflow_run: | |
workflows: ['CI'] # runs after CI workflow | |
types: | |
- completed | |
workflow_dispatch: | |
jobs: | |
report: | |
runs-on: ubuntu-latest | |
name: Create test report | |
steps: | |
- name: Download XML test reports | |
uses: actions/download-artifact@v3 | |
with: | |
#name: test-results-${{ matrix.category }} | |
path: test-results | |
- name: Install smink | |
run: | | |
BASEURL="https://github.com/erikbra/smink/releases/download/" | |
VERSION="0.2.0" | |
INSTALL_DIR="/tmp/smink" | |
SMINK="${INSTALL_DIR}/smink" | |
FILENAME="smink-linux-x64-${VERSION}.zip" | |
FULL_URL="${BASEURL}${VERSION}/${FILENAME}" | |
DOWNLOAD_DIR="/tmp/smink-download" | |
DOWNLOAD_FILE="${DOWNLOAD_DIR}/${FILENAME}" | |
test -f "${SMINK}" && \ | |
echo "smink already installed - not installing" || \ | |
echo "Installing smink v ${VERSION}" && \ | |
(test -d "${DOWNLOAD_DIR}" || mkdir -p "${DOWNLOAD_DIR}") && \ | |
(test -d "${INSTALL_DIR}" || mkdir -p "${INSTALL_DIR}") && \ | |
(test -f "${DOWNLOAD_FILE}" || curl -o "${TADOWNLOAD_FILERGET}" -sL "${DOWNLOAD_URL}") && \ | |
unzip -o "${DOWNLOAD_FILE}" -d "${INSTALL_DIR}" | |
chmod u+x "${SMINK}" | |
- name: Create HTML test report | |
run: | | |
XML_DIR='/tmp/xml' | |
echo "xml dir: $XML_DIR" | |
test -d $XML_DIR || mkdir $XML_DIR | |
find "test-results" -name '*.xml' -exec cp "{}" $XML_DIR \; | |
ls -lR $XML_DIR | |
/tmp/smink/smink "$XML_DIR/*.xml" "test-results/test-report.html" | |
- name: Upload HTML test report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-html-report | |
path: | | |
"test-results/test-report.html" | |
retention-days: 1 | |