chore: update linting workflows to include dev branch in merge_group
This commit is contained in:
parent
1af961f1f7
commit
2102c1d5f2
4 changed files with 25 additions and 1 deletions
20
.github/workflows/python_test.yml
vendored
20
.github/workflows/python_test.yml
vendored
|
|
@ -1,4 +1,4 @@
|
|||
name: test
|
||||
name: Python tests
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -13,6 +13,8 @@ on:
|
|||
- "poetry.lock"
|
||||
- "pyproject.toml"
|
||||
- "src/backend/**"
|
||||
merge_group:
|
||||
branches: [dev]
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.8.2"
|
||||
|
|
@ -43,3 +45,19 @@ jobs:
|
|||
- name: Run unit tests
|
||||
run: |
|
||||
make unit_tests args="-n auto"
|
||||
- name: Test CLI
|
||||
run: |
|
||||
poetry run python -m langflow run --host 127.0.0.1 --port 7860 --backend-only &
|
||||
SERVER_PID=$!
|
||||
# Wait for the server to start
|
||||
timeout 120 bash -c 'until curl -f http://127.0.0.1:7860/health; do sleep 2; done' || (echo "Server did not start in time" && kill $SERVER_PID && exit 1)
|
||||
# Terminate the server
|
||||
kill $SERVER_PID || (echo "Failed to terminate the server" && exit 1)
|
||||
sleep 10 # give the server some time to terminate
|
||||
# Check if the server is still running
|
||||
if kill -0 $SERVER_PID 2>/dev/null; then
|
||||
echo "Failed to terminate the server"
|
||||
exit 1
|
||||
else
|
||||
echo "Server terminated successfully"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue