v3.0.0 release #12
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: CI | |
| on: | |
| push: | |
| branches: ["main", "master"] | |
| pull_request: | |
| branches: ["main", "master"] | |
| jobs: | |
| test: | |
| name: Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Run pytest | |
| run: uv run pytest | |
| - name: Run ruff check | |
| run: uv run ruff check src/ tests/ | |
| if: matrix.python-version == '3.12' | |
| - name: Run ty check | |
| run: uv run ty check src/ | |
| if: matrix.python-version == '3.12' | |
| package: | |
| name: Package smoke test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Build wheel | |
| run: pip install build && python -m build | |
| - name: Install from wheel | |
| run: pip install dist/farchive-*.whl | |
| - name: Import smoke test | |
| run: python -c "from farchive import Farchive, StateSpan, Event; print('import ok')" | |
| - name: CLI smoke test | |
| run: | | |
| command -v farchive | |
| farchive --help > /dev/null | |
| - name: Roundtrip smoke test | |
| run: | | |
| python -c " | |
| from farchive import Farchive | |
| import tempfile, os | |
| with tempfile.TemporaryDirectory() as td: | |
| with Farchive(os.path.join(td, 't.farchive')) as fa: | |
| fa.store('loc/a', b'hello') | |
| assert fa.get('loc/a') == b'hello' | |
| fa.store('loc/a', b'world') | |
| fa.store('loc/a', b'hello') | |
| assert len(fa.history('loc/a')) == 3 | |
| print('roundtrip ok') | |
| " | |
| - name: Verify py.typed marker in installed package | |
| run: python -c "from importlib.resources import files; assert (files('farchive') / 'py.typed').is_file(), 'py.typed missing from installed package'" | |
| - name: Verify twine check | |
| run: pip install twine && twine check dist/* |