Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
github: "david-lev"
patreon: "davidlev"
buy_me_a_coffee: "davidlev"
ko_fi: "davidlev"
custom: ["https://paypal.me/davidlev"]
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish Python Package to PyPI

on:
release:
types: [published]

permissions:
contents: read

jobs:
build-and-publish:
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/apkpull

permissions:
id-token: write

steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Install Python 3.10
run: uv python install 3.10

- name: Build
run: uv build

- name: Smoke test (wheel)
run: uv run --isolated --no-project --with dist/*.whl python -c "import apkpull; print(apkpull.__version__)"

- name: Smoke test (source distribution)
run: uv run --isolated --no-project --with dist/*.tar.gz python -c "import apkpull; print(apkpull.__version__)"

- name: Publish
run: uv publish
69 changes: 69 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI

on:
push:
pull_request:

permissions:
contents: read

jobs:
tests:
name: pytest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Every supported Python version, on the cheapest runner. Integration tests that need a
# real adb device/emulator skip themselves automatically when none is present (see
# tests/integration/test_live_emulator.py) — no device is set up in CI.
- { os: ubuntu-latest, python-version: '3.10' }
- { os: ubuntu-latest, python-version: '3.11' }
- { os: ubuntu-latest, python-version: '3.12' }
- { os: ubuntu-latest, python-version: '3.13' }
- { os: ubuntu-latest, python-version: '3.14' }
# Min/max Python only on macOS/Windows, to catch OS-specific issues (path handling,
# subprocess quoting, apkpull.notify's platform branches, ...).
- { os: macos-latest, python-version: '3.10' }
- { os: macos-latest, python-version: '3.14' }
- { os: windows-latest, python-version: '3.10' }
- { os: windows-latest, python-version: '3.14' }

steps:
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync

- name: Run tests
run: uv run pytest

lint:
name: lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: '3.10'

- name: Install dependencies
run: uv sync

- name: Run ruff check
run: uv run ruff check .

- name: Run ruff format
run: uv run ruff format --check .

- name: Run ty
run: uv run ty check
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
__pycache__/
*.pyc
.idea
.vscode

# build artifacts
build/
dist/
*.egg-info/

# tooling
.venv/
venv/
.ruff_cache/
.pytest_cache/
.ty_cache/
.mypy_cache/
.coverage
coverage.xml
htmlcov/
36 changes: 36 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

ci:
autoupdate_schedule: quarterly
skip: [ty]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-illegal-windows-names
- id: check-json

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.2
hooks:
- id: ruff-check
args: [ --fix ]
- id: ruff-format

- repo: https://github.com/astral-sh/ty-pre-commit
rev: v0.0.70
hooks:
- id: ty

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.12.3
hooks:
- id: uv-lock
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 David Lev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading