Fix GitHub Actions integration_test.yml to work with lila-docker service #147
Workflow file for this run
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: Lila integration test | |
| on: | |
| push: | |
| branches: ["master"] | |
| paths: | |
| - ".github/workflows/integration_test.yml" | |
| - "integration/**" | |
| - "berserk/**" | |
| - "pyproject.toml" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/integration_test.yml" | |
| - "integration/**" | |
| - "berserk/**" | |
| - "pyproject.toml" | |
| jobs: | |
| lila: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| services: | |
| bdit_lila: | |
| image: ghcr.io/lichess-org/lila-docker:main | |
| options: --restart=always | |
| steps: | |
| - name: Checkout berserk | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| uv sync | |
| uv run python -m pip install pytest | |
| - name: Install berserk in development mode | |
| run: uv run python -m pip install -e . --no-cache-dir | |
| - name: Wait for lila to be ready | |
| run: | | |
| attempts=0 | |
| echo "🔍 Checking if lila is ready..." | |
| while [ $attempts -lt 30 ]; do | |
| if [ "$(curl -s -o /dev/null -w '%{http_code}' http://bdit_lila:8080)" -eq 200 ]; then | |
| echo "✅ Lila is ready!" | |
| break | |
| fi | |
| echo "⌛ Waiting for lila to start... (attempt $((attempts + 1)))" | |
| sleep 1 | |
| attempts=$((attempts + 1)) | |
| done | |
| if [ $attempts -eq 30 ]; then | |
| echo "❌ Lila failed to start after 30 attempts" | |
| exit 1 | |
| fi | |
| - name: Run integration tests | |
| run: | | |
| uv run pytest integration |