Skip to content

feat: complete switch to expires_in, add to_blocks, and to_seconds ut… #61

feat: complete switch to expires_in, add to_blocks, and to_seconds ut…

feat: complete switch to expires_in, add to_blocks, and to_seconds ut… #61

Workflow file for this run

name: CI
on:
push:
branches: ["**"] # Run on all branches for early feedback
pull_request:
branches: [main] # Run on PRs targeting main
jobs:
# Fast linting job with minimal dependencies
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install lint dependencies only
run: uv sync --group lint
- name: Run code formatting check
run: uv run ruff format --check src/ tests/
- name: Run linting
run: uv run ruff check src/ tests/
- name: Run type checking
run: uv run mypy src/
# Comprehensive testing job with full test dependencies
test:
runs-on: ubuntu-latest
continue-on-error: true # Don't block workflow on test failures (known flakiness)
strategy:
fail-fast: false # Run all matrix combinations even if one fails
matrix:
python-version: ["3.10", "3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install test dependencies only
run: uv sync --group test
- name: Run all tests
run: uv run pytest tests/ -v --log-cli-level=INFO
# Build verification job
build:
runs-on: ubuntu-latest
needs: lint # Only require lint to pass, tests are informational
if: ${{ !cancelled() }} # Run unless workflow was cancelled
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Check CI status
run: |
echo "⚙️ Build proceeding with following status:"
echo " Lint: ${{ needs.lint.result }}"
echo " Tests: Run separately (may have flaky failures)"
echo ""
echo "ℹ️ Note: Tests run but don't block build due to known flakiness"
- name: Build package
run: uv build
- name: Verify package can be installed
run: |
# Create a temporary virtual environment for testing
python -m venv test-install-env
source test-install-env/bin/activate
pip install dist/*.whl
python -c "from arkiv import Arkiv; print('✅ Package installation successful')"