Skip to content

Commit

Permalink
require successful tests before building the binary
Browse files Browse the repository at this point in the history
  • Loading branch information
n8marti committed Apr 3, 2024
1 parent 90a8d75 commit e5fd830
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
# apt-get install python3-tk
pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
pip install pyinstaller
- name: Build with pyinstaller
Expand Down
15 changes: 12 additions & 3 deletions scripts/build-binary.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
#!/usr/bin/env bash
script_dir="$(dirname "$0")"
repo_root="$(dirname "$script_dir")"
if ! which pyinstaller >/dev/null 2>&1; then
echo "Error: Need to install pyinstaller; e.g. 'pip3 install pyinstaller'"
if ! python -c 'import coverage' >/dev/null 2>&1; then
echo "Error: Need to install coverage; e.g. 'pip install coverage'"
exit 1
fi
python3 -m PyInstaller --clean "${repo_root}/LogosLinuxInstaller.spec"
if ! python -c 'import PyInstaller' >/dev/null 2>&1; then
echo "Error: Need to install pyinstaller; e.g. 'pip install pyinstaller'"
exit 1
fi
if ! python -m coverage run -m unittest -b; then
echo "Error: Must past unittests before building"
echo "Run 'python -m coverage run -m unittest -b -v' to see which test is failing"
exit 1
fi
python -m PyInstaller --clean "${repo_root}/LogosLinuxInstaller.spec"

0 comments on commit e5fd830

Please sign in to comment.