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
3 changed files with 5 additions and 1 deletions

View File

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

View File

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

View File

@@ -18,6 +18,8 @@ if [[ $? -ne 0 ]]; then
exit 1 exit 1
fi fi
docker images
(docker-compose up &) (docker-compose up &)
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
@@ -28,6 +30,7 @@ fi
RETRY=0 RETRY=0
do_request() { 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' 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'
} }