1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 17:24:46 +00:00
Files
dotdrop/scripts/check-tests-ng.sh
deadc0de6 2af2aecfda linting
2023-02-06 17:30:29 +01:00

29 lines
689 B
Bash
Executable File
Vendored

#!/bin/sh
# author: deadc0de6 (https://github.com/deadc0de6)
# Copyright (c) 2023, deadc0de6
# stop on first error
set -e
tmpworkdir="/tmp/dotdrop-tests-workdir"
export DOTDROP_WORKDIR="${tmpworkdir}"
# check if tmp dir is present
workdir_tmp_exists="no"
[ -d "${HOME}/.config/dotdrop/tmp" ] && workdir_tmp_exists="yes"
# run bash tests
if [ -z "${GITHUB_WORKFLOW}" ]; then
## local
tests-ng/tests_launcher.py
else
## CI/CD
# running multiple jobs in parallel sometimes
# messes with the results on remote servers
tests-ng/tests_launcher.py 1
fi
# clear workdir
[ "${workdir_tmp_exists}" = "no" ] && rm -rf ~/.config/dotdrop/tmp
# clear temp workdir
rm -rf "${tmpworkdir}"