Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Commit

Permalink
feat(ci): collapse cypress tests in CI logs
Browse files Browse the repository at this point in the history
We collapse the cypress tests in the CI logs to aid readability.

Signed-off-by: Thomas Scholtes <thomas@monadic.xyz>
  • Loading branch information
Thomas Scholtes committed Apr 15, 2021
1 parent 9ec800d commit 3aad194
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion ci/run.sh
Expand Up @@ -89,7 +89,15 @@ time yarn run webpack --config-name main
log-group-end

log-group-start "Starting proxy daemon and runing app tests"
time ELECTRON_ENABLE_LOGGING=1 yarn test
# We modify the output of the tests to add log groups to the cypress
# tests.
time FORCE_COLOR=1 ELECTRON_ENABLE_LOGGING=1 yarn test |
sed "
s/^\\s*Running:/$(log-group-end)\n$(log-group-start)Running:/
s/^.*Run Finished.*/$(log-group-end)\n$(log-group-start)Run Finished/
"


log-group-end

if [[ "${BUILDKITE_BRANCH:-}" == "master" || -n "${BUILDKITE_TAG:-}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion ci/setup-buildkite.sh
Expand Up @@ -21,7 +21,7 @@ else
fi

function log-group-start () {
echo "--- $1"
echo "--- ${1:-}"
}

function log-group-end () {
Expand Down
2 changes: 1 addition & 1 deletion ci/setup-github-actions.sh
Expand Up @@ -4,7 +4,7 @@ set -Eeou pipefail
export CACHE_FOLDER="$HOME/cache"

function log-group-start () {
echo "::group::$1"
echo "::group::${1:-}"
}

function log-group-end () {
Expand Down

0 comments on commit 3aad194

Please sign in to comment.