add ci hook

This commit is contained in:
Crutcher Dunnavant
2023-03-25 00:41:21 +00:00
parent 3b1abaaad1
commit f929d2eaba
2 changed files with 25 additions and 1 deletions

2
python/.gitignore vendored
View File

@@ -1,2 +1,2 @@
.*.swp
.venv/

24
python/ci.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
# CI hook script.
set -ex
# CD to this directory.
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR
# clean env
rm -rf .venv build
# setup a python virtual env
python -m venv .venv
# activate the virtual env
source .venv/bin/activate
# install venv deps.
pip install -r requirements.txt
# run the build and test.
./test.sh