Skip to content

Commit

Permalink
tries fixing CI
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Sep 19, 2023
1 parent 85a57a8 commit fb6296a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 73 deletions.
59 changes: 3 additions & 56 deletions scripts/install
Original file line number Diff line number Diff line change
@@ -1,57 +1,4 @@
#!/bin/bash
# WF 2020-03-25
os=$(uname -a)
useroption=""
#useroption="--user"

#
# autoinstall the package for the given command
#
autoinstall() {
local l_cmd="$1"
local l_package="$2"
echo "checking whether $l_cmd is installed ..."
which $l_cmd
if [ $? -ne 0 ]
then
echo "installing $l_cmd from package $l_package ..."
$install $l_package
fi
}
case $os in
Darwin*)
pip="pip3"
install="sudo port install"
;;
*)
pip="pip3"
if [ "$USER" = "travis" ]
then
# https://stackoverflow.com/a/20621143/1497139
echo "environment is travis with python version $TRAVIS_PYTHON_VERSION"
pip="pip"
useroption=""
fi
install="sudo apt-get install"
;;
esac
while [ "$1" != "" ]
do
option="$1"
case $option in
-d|--debug)
# show environment for debugging
env
;;
-p|--python)
shift
pip="$1 -m pip"
;;
esac
shift
done
#$install python3-pip
#autoinstall jq jq
$pip --version
echo "installing required python modules with $pip install $useroption"
if [ -f requirements.txt ]; then $pip install $useroption -r requirements.txt; fi
# WF 2023-07-19
# simple install via pyproject.toml
pip install .
24 changes: 7 additions & 17 deletions scripts/test
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
#!/bin/bash
# WF 2020-06-03
python="python3"
while [ "$1" != "" ]
do
option="$1"
case $option in
-d|--debug)
# show environment for debugging
env
;;
-p|--python)
shift
python="$1"
;;
esac
shift
done
$python -m unittest discover
#python3 -m unittest discover
pip list | egrep "^green "
if [ $? -ne 0 ]
then
pip install green
fi
green tests -s 1

0 comments on commit fb6296a

Please sign in to comment.