[P] Add general smoke test and Store incremental test
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
name: Hub component testing
|
||||
name: Component testing
|
||||
on: [push, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
hub-test:
|
||||
name: Hub testing
|
||||
runs-on: host-arch-x86_64
|
||||
steps:
|
||||
- name: Clone repository
|
||||
@@ -19,3 +20,52 @@ jobs:
|
||||
- name: Clean up containers
|
||||
if: ${{always()}}
|
||||
run: docker image rm local/hub/${{gitea.sha}}
|
||||
|
||||
store-test:
|
||||
name: Store testing
|
||||
runs-on: host-arch-x86_64
|
||||
steps:
|
||||
- name: Clone repository
|
||||
run: git clone --revision ${{ gitea.sha }} --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }}
|
||||
|
||||
- name: Build Store testing container
|
||||
working-directory: IoT-Systems
|
||||
run: docker build -t local/store/${{gitea.sha}} -f store/Dockerfile-test .
|
||||
|
||||
- name: Run Store tests
|
||||
working-directory: IoT-Systems
|
||||
run: docker run --rm -it local/store/${{gitea.sha}}
|
||||
|
||||
- name: Clean up containers
|
||||
if: ${{always()}}
|
||||
run: docker image rm local/store/${{gitea.sha}}
|
||||
|
||||
integration-smoke-test:
|
||||
name: Integration smoke testing
|
||||
runs-on: host-arch-x86_64
|
||||
needs:
|
||||
- hub-test
|
||||
- store-test
|
||||
steps:
|
||||
- name: Clone repository
|
||||
run: git clone --revision ${{ gitea.sha }} --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }}
|
||||
|
||||
#- name: Build all production containers
|
||||
#working-directory: IoT-Systems
|
||||
#run: docker-compose build
|
||||
|
||||
- name: Start all production containers
|
||||
working-directory: IoT-Systems
|
||||
run: docker-compose up -d
|
||||
|
||||
- name: Wait for crashes to happen
|
||||
run: sleep 30
|
||||
|
||||
- name: Check for dead containers
|
||||
working-directory: IoT-Systems
|
||||
run: docker ps -a | python3 utils/check-up.py
|
||||
|
||||
- name: Clean up
|
||||
if: ${{always()}}
|
||||
working-directory: IoT-Systems
|
||||
run: docker-compose down -v
|
||||
|
||||
Reference in New Issue
Block a user