fix: docker test in CI failed (#1695)

* feat: allow to run ci for test

* fix: use latest tag in docker compose to fix CI issue
This commit is contained in:
Alisa 2024-05-12 21:01:50 +08:00 committed by GitHub
parent 67bf187d99
commit 33e86c8669
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,7 @@ on:
- 'CHANGELOG.MD'
branches: master
pull_request:
workflow_dispatch:
name: CI
jobs:

View File

@ -1,7 +1,7 @@
services:
app:
container_name: mx-server
image: innei/mx-server:5
image: innei/mx-server:latest
environment:
- TZ=Asia/Shanghai
- NODE_ENV=production

View File

@ -18,6 +18,8 @@ if [[ $? -ne 0 ]]; then
exit 1
fi
docker images
(docker-compose up &)
if [[ $? -ne 0 ]]; then
@ -28,6 +30,7 @@ fi
RETRY=0
do_request() {
docker ps -a
curl -f -m 10 localhost:2333/api/v2 -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36'
}