mirror of
https://github.com/open-webui/open-webui
synced 2024-11-25 05:18:15 +00:00
Merge pull request #3333 from perfectra1n/dev
This commit is contained in:
commit
6e04ca85cb
32
.github/workflows/integration-test.yml
vendored
32
.github/workflows/integration-test.yml
vendored
@ -43,7 +43,7 @@ jobs:
|
|||||||
uses: cypress-io/github-action@v6
|
uses: cypress-io/github-action@v6
|
||||||
with:
|
with:
|
||||||
browser: chrome
|
browser: chrome
|
||||||
wait-on: 'http://localhost:3000'
|
wait-on: "http://localhost:3000"
|
||||||
config: baseUrl=http://localhost:3000
|
config: baseUrl=http://localhost:3000
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
@ -82,18 +82,18 @@ jobs:
|
|||||||
--health-retries 5
|
--health-retries 5
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
# mysql:
|
# mysql:
|
||||||
# image: mysql
|
# image: mysql
|
||||||
# env:
|
# env:
|
||||||
# MYSQL_ROOT_PASSWORD: mysql
|
# MYSQL_ROOT_PASSWORD: mysql
|
||||||
# MYSQL_DATABASE: mysql
|
# MYSQL_DATABASE: mysql
|
||||||
# options: >-
|
# options: >-
|
||||||
# --health-cmd "mysqladmin ping -h localhost"
|
# --health-cmd "mysqladmin ping -h localhost"
|
||||||
# --health-interval 10s
|
# --health-interval 10s
|
||||||
# --health-timeout 5s
|
# --health-timeout 5s
|
||||||
# --health-retries 5
|
# --health-retries 5
|
||||||
# ports:
|
# ports:
|
||||||
# - 3306:3306
|
# - 3306:3306
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -143,7 +143,6 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
- name: Test backend with Postgres
|
- name: Test backend with Postgres
|
||||||
if: success() || steps.sqlite.conclusion == 'failure'
|
if: success() || steps.sqlite.conclusion == 'failure'
|
||||||
env:
|
env:
|
||||||
@ -172,7 +171,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check that service will reconnect to postgres when connection will be closed
|
# Check that service will reconnect to postgres when connection will be closed
|
||||||
status_code=$(curl --write-out %{http_code} -s --output /dev/null http://localhost:8081/api/tags)
|
status_code=$(curl --write-out %{http_code} -s --output /dev/null http://localhost:8081/health)
|
||||||
if [[ "$status_code" -ne 200 ]] ; then
|
if [[ "$status_code" -ne 200 ]] ; then
|
||||||
echo "Server has failed before postgres reconnect check"
|
echo "Server has failed before postgres reconnect check"
|
||||||
exit 1
|
exit 1
|
||||||
@ -184,13 +183,12 @@ jobs:
|
|||||||
cur = conn.cursor(); \
|
cur = conn.cursor(); \
|
||||||
cur.execute('SELECT pg_terminate_backend(psa.pid) FROM pg_stat_activity psa WHERE datname = current_database() AND pid <> pg_backend_pid();')"
|
cur.execute('SELECT pg_terminate_backend(psa.pid) FROM pg_stat_activity psa WHERE datname = current_database() AND pid <> pg_backend_pid();')"
|
||||||
|
|
||||||
status_code=$(curl --write-out %{http_code} -s --output /dev/null http://localhost:8081/api/tags)
|
status_code=$(curl --write-out %{http_code} -s --output /dev/null http://localhost:8081/health)
|
||||||
if [[ "$status_code" -ne 200 ]] ; then
|
if [[ "$status_code" -ne 200 ]] ; then
|
||||||
echo "Server has not reconnected to postgres after connection was closed: returned status $status_code"
|
echo "Server has not reconnected to postgres after connection was closed: returned status $status_code"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# - name: Test backend with MySQL
|
# - name: Test backend with MySQL
|
||||||
# if: success() || steps.sqlite.conclusion == 'failure' || steps.postgres.conclusion == 'failure'
|
# if: success() || steps.sqlite.conclusion == 'failure' || steps.postgres.conclusion == 'failure'
|
||||||
# env:
|
# env:
|
||||||
|
Loading…
Reference in New Issue
Block a user