Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
6e04ca85
Unverified
Commit
6e04ca85
authored
Jun 20, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Jun 20, 2024
Browse files
Merge pull request #3333 from perfectra1n/dev
parents
71a7750c
9f39bcb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
20 deletions
+18
-20
.github/workflows/integration-test.yml
.github/workflows/integration-test.yml
+18
-20
No files found.
.github/workflows/integration-test.yml
View file @
6e04ca85
...
@@ -25,7 +25,7 @@ jobs:
...
@@ -25,7 +25,7 @@ jobs:
--file docker-compose.api.yaml \
--file docker-compose.api.yaml \
--file docker-compose.a1111-test.yaml \
--file docker-compose.a1111-test.yaml \
up --detach --build
up --detach --build
-
name
:
Wait for Ollama to be up
-
name
:
Wait for Ollama to be up
timeout-minutes
:
5
timeout-minutes
:
5
run
:
|
run
:
|
...
@@ -43,7 +43,7 @@ jobs:
...
@@ -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:
...
@@ -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
...
@@ -142,7 +142,6 @@ jobs:
...
@@ -142,7 +142,6 @@ jobs:
echo "Server has stopped"
echo "Server has stopped"
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'
...
@@ -170,9 +169,9 @@ jobs:
...
@@ -170,9 +169,9 @@ jobs:
echo "Server has stopped"
echo "Server has stopped"
exit 1
exit 1
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
...
@@ -183,14 +182,13 @@ jobs:
...
@@ -183,14 +182,13 @@ jobs:
conn = pg2.connect(dsn=os.environ['DATABASE_URL'].replace('+pool', '')); \
conn = pg2.connect(dsn=os.environ['DATABASE_URL'].replace('+pool', '')); \
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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment