Release 1.2.4.0 #128
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: Daily Build | |
| on: | |
| push: | |
| branches: [main] # Run on every commit to main | |
| schedule: | |
| - cron: "0 8 * * *" # Every day at 08:00 UTC | |
| workflow_dispatch: # Allow manual triggering from GitHub UI | |
| jobs: | |
| daily-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run tests | |
| run: | | |
| pytest | |
| docker-compose: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| env: | |
| COMPOSE_PROJECT_NAME: ci | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Seed demo config for container build | |
| run: | | |
| cp demo/settings/system.json deploy/docker/config/system.json | |
| cp demo/settings/system.json deploy/docker/config/system.json.template | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| run: | | |
| docker compose build --progress plain | |
| - name: Start stack | |
| run: | | |
| docker compose up -d | |
| - name: Wait for API health | |
| run: | | |
| container_id="$(docker compose ps -q pypnm-api)" | |
| if [ -z "$container_id" ]; then | |
| echo "API container was not created" | |
| docker compose ps | |
| exit 1 | |
| fi | |
| for attempt in $(seq 1 30); do | |
| status="$(docker inspect --format '{{if .State.Health}}{{.State.Health.Status}}{{else}}{{.State.Status}}{{end}}' "$container_id")" | |
| if [ "$status" = "healthy" ]; then | |
| exit 0 | |
| fi | |
| echo "Container not healthy yet (status: $status); waiting..." | |
| sleep 5 | |
| done | |
| echo "Container failed to become healthy" | |
| docker compose logs | |
| exit 1 | |
| - name: Tear down | |
| if: always() | |
| run: | | |
| docker compose down --volumes |