Feature: Improve the operation of CI tasks (#67) #8
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: Python CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check Docker availability | |
| run: | | |
| echo "=== Checking Docker installation ===" | |
| docker --version | |
| docker info | |
| echo "" | |
| echo "=== Checking Docker daemon status ===" | |
| systemctl status docker --no-pager || true | |
| - name: Test Docker pull | |
| run: | | |
| echo "=== Attempting to pull python:3.11 image ===" | |
| docker pull python:3.11 | |
| echo "" | |
| echo "=== Verifying pulled image ===" | |
| docker images | grep python | |
| echo "" | |
| echo "=== Testing python:3.11 container ===" | |
| docker run --rm python:3.11 python --version | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install uv | |
| - name: Set up project (install dependencies without building) | |
| run: | | |
| uv sync --all-extras --group test | |
| - name: Run fast tests | |
| run: | | |
| mkdir -p data/logs | |
| echo "🚀 Running fast tests..." | |
| uv run pytest -m "not slow" --reruns 1 | |
| - name: Run slow tests | |
| if: success() | |
| run: | | |
| echo "🐌 Running slow tests..." | |
| uv run pytest -m "slow" --reruns 1 |