Skip to content

Updated Tests

Updated Tests #123

Workflow file for this run

name: Docker Build Test
on:
pull_request:
paths:
- "**.py"
- "Dockerfile"
- "run.sh"
- "requirements.txt"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Build Docker Image"
run: |
docker build -t labconnect-backend .
- name: "Run Docker Container"
run: |
docker run -d --name labconnect-backend-container labconnect-backend
sleep 60
docker logs labconnect-backend-container
docker stop labconnect-backend-container
- name: "Check for Container Exit Code"
run: |
docker inspect labconnect-backend-container --format='{{.State.ExitCode}}'
docker rm labconnect-backend-container
id: exit_code
- name: "Fail if Container Fails"
if: steps.exit_code.outputs.exit_code != '0'
run: exit 1