Skip to content

docs: prepare changelog for 0.1.1 release #96

docs: prepare changelog for 0.1.1 release

docs: prepare changelog for 0.1.1 release #96

Workflow file for this run

name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint & Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: pip install -e .[dev]
- name: Ruff lint check
run: ruff check .
- name: Black format check
run: black --check .
- name: basedPyright check
run: python -m basedpyright --pythonpath "$(python -c 'import sys; print(sys.executable)')"
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
pip-${{ runner.os }}-${{ matrix.python-version }}-
- name: Install dependencies
run: pip install -e .[dev]
- name: Run tests with coverage
run: pytest --cov --cov-report=xml --cov-report=term-missing
- name: Upload coverage report
uses: actions/upload-artifact@v4
if: matrix.python-version == '3.13' && always()
with:
name: coverage-report
path: coverage.xml
retention-days: 30
- name: Build wheel
if: matrix.python-version == '3.13'
run: |
python -m pip install --upgrade build
python -m build --wheel
- name: Wheel smoke test (verify vendored backend is packaged)
if: matrix.python-version == '3.13'
run: |
set -euo pipefail
python -m pip install --force-reinstall dist/*.whl
# Confirm the vendored closure was actually packaged into the wheel.
python -c "import pt_snap_cli.vendor.memsnapdump.tools.adaptors.snapshot2db as m; assert hasattr(m, 'run_dump_to_db'), 'vendored run_dump_to_db missing in installed wheel'"
# End-to-end import against a real fixture — catches any packaging
# regression where setuptools drops src/pt_snap_cli/vendor/.
FIXTURE=tests/fixtures/snapshots/snapshot_with_empty_cache.pkl
rm -rf /tmp/pt-snap-wheel-smoke
mkdir -p /tmp/pt-snap-wheel-smoke
pt-snap import "$FIXTURE" --no-focus --output-dir /tmp/pt-snap-wheel-smoke
test -f /tmp/pt-snap-wheel-smoke/snapshot_with_empty_cache.pkl.db
rm -rf /tmp/pt-snap-wheel-smoke