fix(ci): resolve pytest hang after tests pass (loguru __del__ deadlock) #61
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
| # CI: each command runs in its own step so the Actions UI shows whether a hang is | |
| # uv sync, ruff, or pytest. If a job stalls, expand the last step that printed output. | |
| name: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| jobs: | |
| pytest: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v4 | |
| with: | |
| # Pin to avoid surprise regressions from `latest` during CI installs. | |
| version: "0.10.9" | |
| - name: Diagnostics | |
| run: | | |
| set -euo pipefail | |
| uname -a | |
| echo "matrix python-version=${{ matrix.python-version }}" | |
| command -v uv | |
| uv --version | |
| command -v python3 | |
| python3 --version | |
| uv python list || true | |
| - name: Install dependencies (uv sync) | |
| run: | | |
| set -euo pipefail | |
| uv sync --group dev --python ${{ matrix.python-version }} -v | |
| - name: Ruff lint | |
| run: | | |
| set -euo pipefail | |
| uv run ruff check tests | |
| - name: Pytest | |
| run: | | |
| set -euo pipefail | |
| uv run pytest -q |