Skip to content

Commit

Permalink
fix: docker test in CI failed (#1695)
Browse files Browse the repository at this point in the history
* feat: allow to run ci for test

* fix: use latest tag in docker compose to fix CI issue
  • Loading branch information
AlisaAkiron authored May 12, 2024
1 parent 67bf187 commit 33e86c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- 'CHANGELOG.MD'
branches: master
pull_request:
workflow_dispatch:
name: CI

jobs:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions scripts/workflow/test-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ if [[ $? -ne 0 ]]; then
exit 1
fi

docker images

(docker-compose up &)

if [[ $? -ne 0 ]]; then
Expand All @@ -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'

}
Expand Down

0 comments on commit 33e86c8

Please sign in to comment.