File tree Expand file tree Collapse file tree 2 files changed +79
-0
lines changed
Expand file tree Collapse file tree 2 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test scripts' help
2+
3+ on :
4+ push :
5+ workflow_dispatch :
6+
7+ jobs :
8+ job :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+
13+ # https://github.com/actions/setup-python
14+ - name : Install Python 3.11
15+ uses : actions/setup-python@v5
16+ with :
17+ python-version : ' 3.11'
18+
19+ - name : Install pipenv
20+ run : |
21+ pip install --upgrade pip
22+ pip install pipenv
23+
24+ # https://github.com/actions/checkout
25+ - name : Checkout quantifying
26+ uses : actions/checkout@v4
27+
28+ - name : Install Python dependencies
29+ run : |
30+ pipenv sync --system
31+
32+ - name : test scripts' help
33+ run : |
34+ ./dev/test_sripts_help.sh
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # Ensure each script can display help message to ensure basic execution.
4+ #
5+ # This script must be run from within the pipenv shell or a properly configured
6+ # environment.
7+ #
8+ # ### SETUP ####################################################################
9+
10+ set -o errexit
11+ set -o errtrace
12+ set -o nounset
13+
14+ # shellcheck disable=SC2154
15+ trap ' _es=${?};
16+ printf "${0}: line ${LINENO}: \"${BASH_COMMAND}\"";
17+ printf " exited with a status of ${_es}\n";
18+ exit ${_es}' ERR
19+
20+ DIR_REPO=" $( cd -P -- " ${0%/* } /.." && pwd -P) "
21+ EXIT_STATUS=0
22+
23+ # ### FUNCTIONS ################################################################
24+
25+ test_help () {
26+ local _es _script
27+ for _script in $( find scripts/? -* -type f -name ' *.py' | sort)
28+ do
29+ _es=0
30+ ./" ${_script} " --help & > /dev/null || _es=${?}
31+ if (( _es == 0 ))
32+ then
33+ echo " ✅ ${_script} "
34+ else
35+ echo " ❌ ${_script} "
36+ EXIT_STATUS=${_es}
37+ fi
38+ done
39+ }
40+
41+ # ### MAIN #####################################################################
42+
43+ cd " ${DIR_REPO} "
44+ test_help
45+ exit ${EXIT_STATUS}
You can’t perform that action at this time.
0 commit comments