Skip to content

Test output

Test output #126

# This is a basic workflow to help you get started with Actions
name: Test MONAI Deploy Express
on:
push:
paths:
- '.github/workflows/test-monai-deploy-express.yml'
- 'deploy/monai-deploy-express/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Controls when the workflow will run
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install dcmtk
run: |
sudo apt-get update
sudo apt-get install -y dcmtk
- name: Start MONAI Deploy Express
working-directory: ./deploy/monai-deploy-express
run: |
./init.sh
docker compose up --wait
- name: Informatics Gateway Health Check
continue-on-error: true
run: |
curl http://localhost:5000/health
- name: Workflow Manager Health Check
continue-on-error: true
run: |
curl http://localhost:5001/health
- name: Task Manager Health Check
continue-on-error: true
run: |
curl http://localhost:5002/health
- name: Collect Logs
working-directory: ./deploy/monai-deploy-express
continue-on-error: true
run: docker compose logs > logs.txt
- name: Register Hello World Workflow
working-directory: ./deploy/monai-deploy-express
run: |
curl --request POST --header 'Content-Type: application/json' --data "@sample-workflows/hello-world.json" http://localhost:5001/workflows
- name: Download and Send Sample DICOM Data
run: |
curl -L -o sample.dcm "https://github.com/fo-dicom/fo-dicom/raw/refs/heads/development/Tests/FO-DICOM.Tests/Test%20Data/GH1146.dcm"
storescu -v -aet ORTHANC -aec MONAI-DEPLOY localhost 104 sample.dcm
sleep 30s
- name: Verify Hello World Workflow Output
run: |
CONTAINER_ID=$(docker container list -a | grep "alpine:latest" | head -n 1 | awk '{print $1}')
docker container list -a | grep "alpine:latest"
echo "Container ID: $CONTAINER_ID"
docker logs $CONTAINER_ID
test 2 -eq $(docker logs $CONTAINER_ID | grep "1.3.6.1.4.1.23438.1.1.1.dcm" | wc -l)
test 1 -eq $(docker logs $CONTAINER_ID | grep "1.3.6.1.4.1.23438.1.1.1.dcm.json" | wc -l)
- name: Stop MONAI Deploy Express
working-directory: ./deploy/monai-deploy-express
continue-on-error: true
run: docker compose down
- uses: actions/[email protected]
with:
name: logs
path: ./deploy/monai-deploy-express/logs.txt