diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2e01a20..45fe7aa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,6 +44,7 @@ jobs: sudo docker network create mongodb_network sudo docker run -p 27017:27017 -d --name mongo_db --network mongodb_network -v /mongodb:/docker-entrypoint-initdb.d --restart unless-stopped huyuet/mongo:5.0 sudo docker run -p 5000:5000 -d --name backend --network mongodb_network huyuet/backend-image - docker inspect backend + CONTAINER_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAdress}}{{end}}' backend) + curl -X GET $CONTAINER_IP:5000/api/students - name: Run unittest run: python API/unit_test/test_api.py