Skip to content

Implement TestForest Dashboard to summarize tests in Workflow Summary #823

Implement TestForest Dashboard to summarize tests in Workflow Summary

Implement TestForest Dashboard to summarize tests in Workflow Summary #823

Workflow file for this run

name: Build the app
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read # for checkout
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Setup Scala
uses: japgolly/[email protected]
with:
java-version: 'adopt:1.11.0-11'
node-version: '16.7.0'
- name: Cache compiled code
uses: actions/cache@v3
with:
path: |
**/target/
/home/runner/.ivy2/local
key: compiled-code-cache-${{ hashFiles('**/build.sbt') }}
restore-keys: compiled-code-cache-
- name: Run test admin controller
run: CI=true sbt "testOnly controllers.AdminControllerSpec"
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "server/target/test-reports/*.xml"
output: test-summary.md
if: always()
# - name: Print test results
# if: failure()
# run: |
# sudo apt-get update && sudo apt-get install -y libxml2-utils &&
# # Find all XML files in the server/target/test-reports directory
# for file in server/target/test-reports/*.xml; do
# if [ -f "$file" ]; then
# # check if file has <failure> tags
# # dont print boolean
# if xmllint --xpath 'boolean(//testsuite/testcase/failure)' "$file"; then
# echo "Processing $file:"
# # Extract and print <failure> tags inside <testcase> tags
# xmllint --xpath '//testsuite/testcase/failure/text()' "$file"
# echo
# fi
# # echo "Processing $file:"
#
# # Extract and print <failure> tags inside <testcase> tags
# # xmllint --xpath '//testsuite/testcase/failure/text()' "$file"
# # if there are <failure> tags, print <testcase> classname and name attributes
# # xmllint --xpath '//testsuite/testcase/failure/parent::testcase/@classname | //testsuite/testcase/failure/parent::testcase/@name' "$file"
#
# echo
# else
# echo "No XML files found."
# fi
# done
# TODO uncomment when tests are added
# - name: Check code format
# run: sbt scalafmtCheckAll
# - name: Compile
# run: CI=true sbt compile
# - name: Run tests
# run: CI=true sbt test
#
# - name: Prepare web build
# run: sbt web/build
#
# - name: Prepare server build
# run: sbt server/dist