Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nemouet authored May 24, 2024
1 parent 7a0b80c commit 1983197
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,24 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: "3.10.6"

- name: Install dependencies
- name: Install docker
run: |
python -m pip install --upgrade pip
pip install -r API/requirements.txt
- uses: ricardochaves/[email protected]
with:
python-root-list: "API"
use-pylint: false
use-pycodestyle: false
use-flake8: false
use-black: false
use-mypy: false
use-isort: false
sudo apt-get update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo docker --version
sudo apt install docker-ce
- name: Pull image from DockerHub
run: |
sudo docker pull huyuet/mongo:5.0
sudo docker pull huyuet/backend-image
- name: Run tests
- name: Run container
run: |
python API/unit_test/test_api.py
sudo docker network create mongo_network
sudo docker run -d --name mongodb-server --network mongodb_network huyuet/mongo:5.0
sudo docker run -d --name backend --network mongodb_network huyuet/backend-image
- name: Run unittest
run: python API/unit_test/test_api.py

0 comments on commit 1983197

Please sign in to comment.