[P] Refactor testing code
This commit is contained in:
21
.gitea/workflows/tests.yaml
Normal file
21
.gitea/workflows/tests.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Hub component testing
|
||||
on: [push, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
hub-test:
|
||||
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 Hub testing container
|
||||
working-directory: IoT-Systems
|
||||
run: docker build -t local/hub/${{gitea.sha}} -f hub/Dockerfile-test .
|
||||
|
||||
- name: Run Hub tests
|
||||
working-directory: IoT-Systems
|
||||
run: docker run --rm -it local/hub/${{gitea.sha}}
|
||||
|
||||
- name: Clean up containers
|
||||
if: ${{always()}}
|
||||
run: docker image rm local/hub/${{gitea.sha}}
|
||||
Reference in New Issue
Block a user