Skip to content

Commit

Permalink
feat(workflows): add setup-docker-and-run-tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
basarbyz committed Jul 26, 2024
1 parent b551c08 commit b7f65bc
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/setup-docker-and-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,6 @@ jobs:
sleep 5
done
- name: Get Docker container IP
id: get-ip
run: |
CONTAINER_ID=$(docker ps -q --filter "name=mqtt_gateway_api")
CONTAINER_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $CONTAINER_ID)
echo "CONTAINER_IP=$CONTAINER_IP" >> $GITHUB_ENV
- name: Save IP address
run: echo $CONTAINER_IP > container_ip.txt

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: container-ip
path: container_ip.txt

- name: Create .env file for tests
run: cp tests/.env.test.example tests/.env

Expand All @@ -76,11 +60,9 @@ jobs:
pip install -r backend/api/requirements.txt
pip install -r backend/gateway/requirements.txt
- name: Set PYTHONPATH
run: echo "PYTHONPATH=$(pwd)" >> $GITHUB_ENV

- name: Run test_crud.py
run: |
source venv/bin/activate
cd tests
python -m unittest test_crud.py
python -m unittest test_crud.py
python -m unittest test_forwarding.py

0 comments on commit b7f65bc

Please sign in to comment.