File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 9696 password : ${{ secrets.DOCKERHUB_TOKEN }}
9797 repository : ${{ env.DOCKER_IMAGE_NAME }}
9898 readme-filepath : ./README.md
99+
100+ smoke-test :
101+ needs : build-and-push
102+ if : |
103+ github.repository == 'CogStack/CogStack-ModelServe' &&
104+ (
105+ github.ref == 'refs/heads/main' ||
106+ github.event_name == 'pull_request' ||
107+ github.event_name == 'workflow_dispatch'
108+ )
109+ runs-on : ubuntu-latest
110+ steps :
111+ - uses : actions/checkout@v4
112+
113+ - name : Download the test model
114+ run : |
115+ wget -O test_model.zip https://cogstack-medcat-example-models.s3.eu-west-2.amazonaws.com/medcat-example-models/medmen_wstatus_2021_oct.zip
116+
117+ - name : Run the CMS container
118+ run : |
119+ SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)
120+ docker run -d --name cms-test \
121+ -p 8000:8000 \
122+ -e CMS_MODEL_NAME="Test Model" \
123+ -e CMS_MODEL_TYPE="medcat_umls" \
124+ -v $(pwd)/test_model.zip:/app/model/model.zip \
125+ ${{ env.REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}:sha-${SHORT_SHA}
126+
127+ - name : Wait for the CMS container to be ready
128+ run : |
129+ for i in {1..30}; do
130+ if curl -f http://localhost:8000/readyz; then
131+ exit 0
132+ fi
133+ sleep 10
134+ done
135+ echo "CMS did not become ready in time"
136+ exit 1
You can’t perform that action at this time.
0 commit comments