Compare commits
1 Commits
dev
...
e2456166b4
| Author | SHA1 | Date | |
|---|---|---|---|
| e2456166b4 |
@@ -28,6 +28,10 @@ jobs:
|
|||||||
- name: Clone repository
|
- name: Clone repository
|
||||||
run: git clone --revision ${{ gitea.sha }} --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }}
|
run: git clone --revision ${{ gitea.sha }} --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }}
|
||||||
|
|
||||||
|
- name: Start postgres_db container for testing
|
||||||
|
working-directory: IoT-Systems
|
||||||
|
run: docker-compose up -d postgres_db
|
||||||
|
|
||||||
- name: Build Store testing container
|
- name: Build Store testing container
|
||||||
working-directory: IoT-Systems
|
working-directory: IoT-Systems
|
||||||
run: docker build -t local/store/${{gitea.sha}} -f store/Dockerfile-test .
|
run: docker build -t local/store/${{gitea.sha}} -f store/Dockerfile-test .
|
||||||
@@ -40,6 +44,11 @@ jobs:
|
|||||||
if: ${{always()}}
|
if: ${{always()}}
|
||||||
run: docker image rm local/store/${{gitea.sha}}
|
run: docker image rm local/store/${{gitea.sha}}
|
||||||
|
|
||||||
|
- name: Clean up docker-compose
|
||||||
|
if: ${{always()}}
|
||||||
|
working-directory: IoT-Systems
|
||||||
|
run: docker-compose down -v --remove-orphans
|
||||||
|
|
||||||
integration-smoke-test:
|
integration-smoke-test:
|
||||||
name: Integration smoke testing
|
name: Integration smoke testing
|
||||||
runs-on: host-arch-x86_64
|
runs-on: host-arch-x86_64
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ WORKDIR /app
|
|||||||
COPY store/requirements.txt .
|
COPY store/requirements.txt .
|
||||||
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
RUN pip install --root-user-action ignore --no-cache-dir pytest httpx
|
||||||
# Copy the entire application into the container
|
# Copy the entire application into the container
|
||||||
COPY store/. .
|
COPY store/. .
|
||||||
# Run the main.py script inside the container when it starts
|
# Run the main.py script inside the container when it starts
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
PYTHONPATH=$PWD python3 test/main_test.py
|
PYTHONPATH=$PWD python3 test/main_test.py
|
||||||
|
PYTHONPATH=$PWD python3 -m pytest test_db.py
|
||||||
|
|||||||
Reference in New Issue
Block a user