run locust tests in CI

This commit is contained in:
hrj 2021-04-02 15:42:47 +05:30
parent 72f092e6b5
commit 6ea5691c5e
3 changed files with 15 additions and 0 deletions

View File

@ -20,3 +20,5 @@ jobs:
run: sbt test assembly run: sbt test assembly
- name: Run linter - name: Run linter
run: sbt "scalafixAll --check" run: sbt "scalafixAll --check"
- name: Run locust tests
run: ./tests/run.sh

3
.gitignore vendored
View File

@ -9,6 +9,9 @@
.metals .metals
.vscode .vscode
# for python test env
/testEnv/
# for various captcha # for various captcha
/known/ /known/
/unknown/ /unknown/

10
tests/run.sh Executable file
View File

@ -0,0 +1,10 @@
python3 -m venv testEnv
source ./testEnv/activate
pip install locust
java -jar target/scala-2.13/LibreCaptcha.jar &
JAVA_PID=$!
sleep 4
locust -f tests/locustfile.py
kill $JAVA_PID