Files
todoizer/.gitea/workflows/build.yaml
T
krisf 1f637c6bde
Build and Validate / build-and-test (push) Failing after 1m23s
Initial commit of Todoizer web application
2026-04-20 08:56:12 -04:00

39 lines
1.0 KiB
YAML

name: Build and Validate
on:
push:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Build Docker image
run: docker build -t todoizer-app:latest .
- name: Run container
run: |
docker run -d --name todoizer -p 4567:4567 todoizer-app:latest
# Wait for application to start
sleep 5
- name: Validate web application loads
run: |
HTTP_STATUS=$(curl -o /dev/null -s -w "%{http_code}\n" http://localhost:4567/)
if [ "$HTTP_STATUS" -ne 200 ]; then
echo "Failed to load web application. HTTP status: $HTTP_STATUS"
docker logs todoizer
exit 1
else
echo "Web application loaded successfully. HTTP status: $HTTP_STATUS"
fi
- name: Cleanup
if: always()
run: |
docker stop todoizer || true
docker rm todoizer || true