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:
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@@ -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:
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user