Bump ruff from 0.16.1 to 0.16.3 #143
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test container | |
| on: | |
| workflow_call: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: "build container and check health endpoint" | |
| run: | | |
| set -euxo pipefail | |
| docker build -t cofy-api:latest . | |
| CONTAINER_NAME=cofy-api-test | |
| cleanup() { | |
| status=$? | |
| echo "Step exit status: $status" | |
| echo "--- docker ps -a ---" | |
| docker ps -a || true | |
| echo "--- container logs ---" | |
| docker logs "$CONTAINER_NAME" || true | |
| docker stop "$CONTAINER_NAME" >/dev/null 2>&1 || true | |
| docker rm "$CONTAINER_NAME" >/dev/null 2>&1 || true | |
| exit $status | |
| } | |
| trap cleanup EXIT | |
| docker run -d \ | |
| --name "$CONTAINER_NAME" \ | |
| -p 8080:8080 \ | |
| --env-file .env.example \ | |
| cofy-api:latest | |
| for i in {1..15}; do | |
| echo "Health check attempt $i" | |
| if curl -fsS -v http://localhost:8080/health; then | |
| break | |
| fi | |
| sleep 2 | |
| done | |
| RESPONSE=$(curl -fsS http://localhost:8080/health) | |
| echo "Health check response: $RESPONSE" | |
| if [[ "$RESPONSE" != '{"status":"ok"}' ]]; then | |
| echo "Health check failed" | |
| exit 1 | |
| fi |