Files
mtusi2026lab1/.github/workflows/application.yml
T

29 lines
907 B
YAML

name: Application
on: [push, pull_request]
permissions:
contents: read
jobs:
application:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: docker build -t mtusi-messenger:lab1 .
- name: Start and wait for readiness
run: |
docker run -d --name mtusi-messenger-ci -p 127.0.0.1:8080:8080 mtusi-messenger:lab1
for attempt in $(seq 1 60); do
if curl --fail --silent http://127.0.0.1:8080/health/ready; then exit 0; fi
sleep 1
done
docker logs mtusi-messenger-ci
exit 1
- run: make test BASE_URL=http://127.0.0.1:8080
- name: Container logs and cleanup
if: always()
run: |
docker logs mtusi-messenger-ci || true
docker rm -f mtusi-messenger-ci || true