db-git 0.1.1__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- db_git-0.3.0/.github/workflows/docs.yml +61 -0
- db_git-0.3.0/.github/workflows/release.yml +79 -0
- {db_git-0.1.1 → db_git-0.3.0}/.github/workflows/test.yml +49 -24
- {db_git-0.1.1 → db_git-0.3.0}/.gitignore +3 -0
- {db_git-0.1.1 → db_git-0.3.0}/.pre-commit-config.yaml +1 -1
- db_git-0.3.0/CHANGELOG.md +98 -0
- db_git-0.3.0/PKG-INFO +116 -0
- db_git-0.3.0/README.md +82 -0
- db_git-0.3.0/docs/concepts/modes.md +26 -0
- db_git-0.3.0/docs/contributing/development.md +67 -0
- db_git-0.3.0/docs/contributing/documentation.md +55 -0
- db_git-0.3.0/docs/databases/mysql.md +114 -0
- db_git-0.3.0/docs/databases/postgresql.md +63 -0
- db_git-0.3.0/docs/databases/sqlite.md +64 -0
- db_git-0.3.0/docs/getting-started/installation.md +48 -0
- db_git-0.3.0/docs/getting-started/quickstart.md +58 -0
- db_git-0.3.0/docs/guides/applications.md +24 -0
- db_git-0.3.0/docs/guides/checkpoints.md +60 -0
- db_git-0.3.0/docs/guides/recovery.md +63 -0
- db_git-0.3.0/docs/guides/upgrading.md +17 -0
- db_git-0.3.0/docs/guides/worktrees.md +64 -0
- db_git-0.3.0/docs/index.md +51 -0
- db_git-0.3.0/docs/reference/commands.md +155 -0
- db_git-0.3.0/docs/reference/configuration.md +65 -0
- db_git-0.3.0/docs/troubleshooting.md +73 -0
- db_git-0.3.0/mkdocs.yml +87 -0
- {db_git-0.1.1 → db_git-0.3.0}/noxfile.py +26 -2
- {db_git-0.1.1 → db_git-0.3.0}/pyproject.toml +17 -2
- db_git-0.3.0/requirements-docs.txt +3 -0
- db_git-0.3.0/scripts/ci/Dockerfile +23 -0
- db_git-0.3.0/scripts/ci/local.py +141 -0
- db_git-0.3.0/src/db_git/__init__.py +3 -0
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/backends/__init__.py +30 -1
- db_git-0.3.0/src/db_git/backends/mysql/__init__.py +1 -0
- db_git-0.3.0/src/db_git/backends/mysql/backend.py +86 -0
- db_git-0.3.0/src/db_git/backends/mysql/branch_db.py +172 -0
- db_git-0.3.0/src/db_git/backends/mysql/connections.py +179 -0
- db_git-0.3.0/src/db_git/backends/mysql/doctor.py +116 -0
- db_git-0.3.0/src/db_git/backends/mysql/dump.py +228 -0
- db_git-0.3.0/src/db_git/backends/mysql/objects.py +515 -0
- db_git-0.3.0/src/db_git/backends/mysql/operations.py +136 -0
- db_git-0.3.0/src/db_git/backends/mysql/permissions.py +113 -0
- db_git-0.3.0/src/db_git/backends/mysql/shared.py +211 -0
- db_git-0.3.0/src/db_git/backends/mysql/urls.py +78 -0
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/backends/postgresql/backend.py +22 -13
- db_git-0.3.0/src/db_git/backends/postgresql/branch_db.py +201 -0
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/backends/postgresql/connections.py +23 -1
- db_git-0.3.0/src/db_git/backends/postgresql/operations.py +127 -0
- db_git-0.3.0/src/db_git/backends/postgresql/pgdump.py +257 -0
- db_git-0.3.0/src/db_git/backends/postgresql/template.py +196 -0
- db_git-0.3.0/src/db_git/backends/sqlite/__init__.py +1 -0
- db_git-0.3.0/src/db_git/backends/sqlite/backend.py +119 -0
- db_git-0.3.0/src/db_git/backends/sqlite/branch_db.py +183 -0
- db_git-0.3.0/src/db_git/backends/sqlite/doctor.py +84 -0
- db_git-0.3.0/src/db_git/backends/sqlite/files.py +64 -0
- db_git-0.3.0/src/db_git/backends/sqlite/operations.py +78 -0
- db_git-0.3.0/src/db_git/backends/sqlite/urls.py +34 -0
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/cli/__init__.py +11 -1
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/cli/_common.py +9 -1
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/cli/_console.py +1 -1
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/cli/_format.py +19 -9
- db_git-0.3.0/src/db_git/cli/_init_resources.py +39 -0
- db_git-0.3.0/src/db_git/cli/_mysql_init.py +84 -0
- db_git-0.3.0/src/db_git/cli/_mysql_recover.py +86 -0
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/cli/_prompts.py +12 -6
- db_git-0.3.0/src/db_git/cli/_sqlite_init.py +88 -0
- db_git-0.3.0/src/db_git/cli/_sqlite_recover.py +70 -0
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/cli/branch.py +51 -21
- db_git-0.3.0/src/db_git/cli/doctor.py +32 -0
- db_git-0.3.0/src/db_git/cli/history.py +176 -0
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/cli/hook.py +27 -3
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/cli/init.py +70 -17
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/cli/inspect.py +154 -17
- db_git-0.3.0/src/db_git/cli/recover.py +166 -0
- db_git-0.3.0/src/db_git/cli/run.py +63 -0
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/cli/snapshot.py +37 -2
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/config.py +116 -31
- db_git-0.3.0/src/db_git/db.py +83 -0
- db_git-0.3.0/src/db_git/doctor.py +634 -0
- db_git-0.3.0/src/db_git/files.py +88 -0
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/git.py +120 -38
- db_git-0.3.0/src/db_git/history.py +305 -0
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/hook_script.py +11 -9
- db_git-0.3.0/src/db_git/recovery.py +206 -0
- db_git-0.3.0/src/db_git/repository.py +153 -0
- db_git-0.3.0/src/db_git/resources.py +78 -0
- db_git-0.3.0/src/db_git/state.py +121 -0
- db_git-0.3.0/src/db_git/storage.py +307 -0
- db_git-0.3.0/src/db_git/workflow.py +81 -0
- db_git-0.3.0/tests/e2e/test_application_workflow.py +195 -0
- db_git-0.3.0/tests/e2e/test_history.py +34 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/e2e/test_per_branch_pgdump_workflow.py +40 -6
- {db_git-0.1.1 → db_git-0.3.0}/tests/e2e/test_per_branch_template_workflow.py +40 -6
- db_git-0.3.0/tests/e2e/test_recovery.py +28 -0
- db_git-0.3.0/tests/e2e/test_safety.py +147 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/e2e/test_shared_pgdump_workflow.py +29 -9
- {db_git-0.1.1 → db_git-0.3.0}/tests/e2e/test_shared_template_workflow.py +24 -10
- db_git-0.3.0/tests/e2e/test_worktrees.py +151 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/integration/test_branch_db.py +8 -7
- db_git-0.3.0/tests/integration/test_connection_fidelity.py +108 -0
- db_git-0.3.0/tests/integration/test_doctor.py +77 -0
- db_git-0.3.0/tests/integration/test_history.py +151 -0
- db_git-0.3.0/tests/integration/test_recovery.py +233 -0
- db_git-0.3.0/tests/integration/test_snapshot_ownership.py +37 -0
- db_git-0.3.0/tests/mysql/conftest.py +88 -0
- db_git-0.3.0/tests/mysql/test_extended.py +360 -0
- db_git-0.3.0/tests/mysql/test_history.py +120 -0
- db_git-0.3.0/tests/mysql/test_init_review.py +41 -0
- db_git-0.3.0/tests/mysql/test_mysql.py +412 -0
- db_git-0.3.0/tests/mysql/test_object_review.py +84 -0
- db_git-0.3.0/tests/mysql/test_workflow_review.py +119 -0
- db_git-0.3.0/tests/sqlite/test_sqlite.py +451 -0
- db_git-0.3.0/tests/unit/__init__.py +0 -0
- db_git-0.3.0/tests/unit/test_checkout_safety.py +90 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/unit/test_cli.py +83 -5
- {db_git-0.1.1 → db_git-0.3.0}/tests/unit/test_config.py +41 -0
- db_git-0.3.0/tests/unit/test_db.py +238 -0
- db_git-0.3.0/tests/unit/test_doctor.py +246 -0
- db_git-0.3.0/tests/unit/test_history.py +187 -0
- db_git-0.3.0/tests/unit/test_init_resources.py +55 -0
- db_git-0.3.0/tests/unit/test_mysql.py +299 -0
- db_git-0.3.0/tests/unit/test_mysql_errors.py +23 -0
- db_git-0.3.0/tests/unit/test_naming_safety.py +130 -0
- db_git-0.3.0/tests/unit/test_recovery.py +246 -0
- db_git-0.3.0/tests/unit/test_restore_safety.py +42 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/unit/test_state.py +7 -3
- {db_git-0.1.1 → db_git-0.3.0}/tests/unit/test_storage.py +9 -7
- db_git-0.3.0/tests/unit/test_workflow.py +203 -0
- db_git-0.3.0/tests/unit/test_worktrees.py +197 -0
- {db_git-0.1.1 → db_git-0.3.0}/uv.lock +170 -17
- db_git-0.1.1/.claude/settings.local.json +0 -29
- db_git-0.1.1/CHANGELOG.md +0 -32
- db_git-0.1.1/PKG-INFO +0 -363
- db_git-0.1.1/README.md +0 -332
- db_git-0.1.1/src/db_git/__init__.py +0 -1
- db_git-0.1.1/src/db_git/backends/postgresql/branch_db.py +0 -203
- db_git-0.1.1/src/db_git/backends/postgresql/pgdump.py +0 -212
- db_git-0.1.1/src/db_git/backends/postgresql/template.py +0 -160
- db_git-0.1.1/src/db_git/db.py +0 -17
- db_git-0.1.1/src/db_git/state.py +0 -105
- db_git-0.1.1/src/db_git/storage.py +0 -203
- db_git-0.1.1/tests/unit/test_db.py +0 -23
- {db_git-0.1.1 → db_git-0.3.0}/.github/dependabot.yml +0 -0
- {db_git-0.1.1 → db_git-0.3.0}/LICENSE +0 -0
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/backends/postgresql/__init__.py +0 -0
- {db_git-0.1.1 → db_git-0.3.0}/src/db_git/errors.py +0 -0
- /db_git-0.1.1/tests/__init__.py → /db_git-0.3.0/src/db_git/py.typed +0 -0
- {db_git-0.1.1/tests/e2e → db_git-0.3.0/tests}/__init__.py +0 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/_pg_helpers.py +0 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/conftest.py +0 -0
- {db_git-0.1.1/tests/integration → db_git-0.3.0/tests/e2e}/__init__.py +0 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/e2e/_helpers.py +0 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/e2e/conftest.py +0 -0
- {db_git-0.1.1/tests/unit → db_git-0.3.0/tests/integration}/__init__.py +0 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/integration/conftest.py +0 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/integration/test_connections.py +0 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/integration/test_pgdump_strategy.py +0 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/integration/test_template_strategy.py +0 -0
- {db_git-0.1.1 → db_git-0.3.0}/tests/unit/test_git.py +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- docs/**
|
|
8
|
+
- mkdocs.yml
|
|
9
|
+
- requirements-docs.txt
|
|
10
|
+
- .github/workflows/docs.yml
|
|
11
|
+
pull_request:
|
|
12
|
+
paths:
|
|
13
|
+
- docs/**
|
|
14
|
+
- mkdocs.yml
|
|
15
|
+
- requirements-docs.txt
|
|
16
|
+
- .github/workflows/docs.yml
|
|
17
|
+
workflow_dispatch:
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
|
|
22
|
+
concurrency:
|
|
23
|
+
group: docs-${{ github.ref }}
|
|
24
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
build:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v7
|
|
31
|
+
- uses: actions/setup-python@v6
|
|
32
|
+
with:
|
|
33
|
+
python-version: "3.12"
|
|
34
|
+
cache: pip
|
|
35
|
+
cache-dependency-path: requirements-docs.txt
|
|
36
|
+
- name: Install documentation tools
|
|
37
|
+
run: python -m pip install -r requirements-docs.txt
|
|
38
|
+
- name: Validate and build documentation
|
|
39
|
+
run: python -m mkdocs build --strict
|
|
40
|
+
- name: Upload Pages artifact
|
|
41
|
+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
|
|
42
|
+
uses: actions/upload-pages-artifact@v3
|
|
43
|
+
with:
|
|
44
|
+
path: site
|
|
45
|
+
|
|
46
|
+
deploy:
|
|
47
|
+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
|
|
48
|
+
needs: build
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
permissions:
|
|
51
|
+
pages: write
|
|
52
|
+
id-token: write
|
|
53
|
+
environment:
|
|
54
|
+
name: github-pages
|
|
55
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
56
|
+
steps:
|
|
57
|
+
- name: Configure GitHub Pages
|
|
58
|
+
uses: actions/configure-pages@v5
|
|
59
|
+
- name: Deploy documentation
|
|
60
|
+
id: deployment
|
|
61
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: [test]
|
|
6
|
+
branches: [main]
|
|
7
|
+
types: [completed]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}
|
|
11
|
+
cancel-in-progress: false
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
release:
|
|
18
|
+
name: semantic release
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
if: github.event.workflow_run.conclusion == 'success'
|
|
21
|
+
permissions:
|
|
22
|
+
contents: write
|
|
23
|
+
id-token: write
|
|
24
|
+
outputs:
|
|
25
|
+
released: ${{ steps.release.outputs.released || 'false' }}
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout release branch
|
|
28
|
+
uses: actions/checkout@v7
|
|
29
|
+
with:
|
|
30
|
+
ref: ${{ github.event.workflow_run.head_branch }}
|
|
31
|
+
fetch-depth: 0
|
|
32
|
+
|
|
33
|
+
- name: Reset to tested commit
|
|
34
|
+
run: git reset --hard "${{ github.event.workflow_run.head_sha }}"
|
|
35
|
+
|
|
36
|
+
- name: Semantic version release
|
|
37
|
+
id: release
|
|
38
|
+
uses: python-semantic-release/python-semantic-release@v10.5.3
|
|
39
|
+
with:
|
|
40
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
41
|
+
git_committer_name: "github-actions"
|
|
42
|
+
git_committer_email: "actions@users.noreply.github.com"
|
|
43
|
+
|
|
44
|
+
- name: Upload distributions to GitHub Release
|
|
45
|
+
if: steps.release.outputs.released == 'true'
|
|
46
|
+
uses: python-semantic-release/publish-action@v10.5.3
|
|
47
|
+
with:
|
|
48
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
49
|
+
tag: ${{ steps.release.outputs.tag }}
|
|
50
|
+
|
|
51
|
+
- name: Upload distributions artifact
|
|
52
|
+
if: steps.release.outputs.released == 'true'
|
|
53
|
+
uses: actions/upload-artifact@v7
|
|
54
|
+
with:
|
|
55
|
+
name: distribution-artifacts
|
|
56
|
+
path: dist
|
|
57
|
+
if-no-files-found: error
|
|
58
|
+
|
|
59
|
+
publish:
|
|
60
|
+
name: publish to PyPI
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
needs: release
|
|
63
|
+
if: needs.release.outputs.released == 'true'
|
|
64
|
+
permissions:
|
|
65
|
+
actions: read
|
|
66
|
+
contents: read
|
|
67
|
+
id-token: write
|
|
68
|
+
steps:
|
|
69
|
+
- name: Download distributions artifact
|
|
70
|
+
uses: actions/download-artifact@v8
|
|
71
|
+
with:
|
|
72
|
+
name: distribution-artifacts
|
|
73
|
+
path: dist
|
|
74
|
+
|
|
75
|
+
- name: Publish package distributions to PyPI
|
|
76
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
77
|
+
with:
|
|
78
|
+
packages-dir: dist
|
|
79
|
+
print-hash: true
|
|
@@ -10,14 +10,42 @@ concurrency:
|
|
|
10
10
|
cancel-in-progress: true
|
|
11
11
|
|
|
12
12
|
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
name: ruff
|
|
15
|
+
runs-on: ubuntu-24.04
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
|
+
- uses: astral-sh/setup-uv@v7
|
|
19
|
+
with:
|
|
20
|
+
enable-cache: true
|
|
21
|
+
- uses: actions/setup-python@v6
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
- run: pipx install nox
|
|
25
|
+
- run: nox -s lint
|
|
26
|
+
|
|
27
|
+
types:
|
|
28
|
+
name: mypy
|
|
29
|
+
runs-on: ubuntu-24.04
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v7
|
|
32
|
+
- uses: astral-sh/setup-uv@v7
|
|
33
|
+
with:
|
|
34
|
+
enable-cache: true
|
|
35
|
+
- uses: actions/setup-python@v6
|
|
36
|
+
with:
|
|
37
|
+
python-version: "3.12"
|
|
38
|
+
- run: pipx install nox
|
|
39
|
+
- run: nox -s types
|
|
40
|
+
|
|
13
41
|
unit:
|
|
14
42
|
name: unit (${{ matrix.python }})
|
|
15
|
-
runs-on: ubuntu-
|
|
43
|
+
runs-on: ubuntu-24.04
|
|
16
44
|
strategy:
|
|
17
45
|
matrix:
|
|
18
46
|
python: ["3.12", "3.13"]
|
|
19
47
|
steps:
|
|
20
|
-
- uses: actions/checkout@
|
|
48
|
+
- uses: actions/checkout@v7
|
|
21
49
|
- uses: astral-sh/setup-uv@v7
|
|
22
50
|
with:
|
|
23
51
|
enable-cache: true
|
|
@@ -29,14 +57,15 @@ jobs:
|
|
|
29
57
|
|
|
30
58
|
integration:
|
|
31
59
|
name: integration (py${{ matrix.python }}, pg${{ matrix.postgres }})
|
|
32
|
-
runs-on: ubuntu-
|
|
60
|
+
runs-on: ubuntu-24.04
|
|
61
|
+
needs: [lint, types, unit]
|
|
33
62
|
strategy:
|
|
34
63
|
fail-fast: false
|
|
35
64
|
matrix:
|
|
36
65
|
python: ["3.12", "3.13"]
|
|
37
66
|
postgres: ["13", "14", "15", "16", "17"]
|
|
38
67
|
steps:
|
|
39
|
-
- uses: actions/checkout@
|
|
68
|
+
- uses: actions/checkout@v7
|
|
40
69
|
- uses: astral-sh/setup-uv@v7
|
|
41
70
|
with:
|
|
42
71
|
enable-cache: true
|
|
@@ -52,30 +81,26 @@ jobs:
|
|
|
52
81
|
- run: pipx install nox
|
|
53
82
|
- run: nox -s "integration-${{ matrix.python }}(pg_image='postgres:${{ matrix.postgres }}')"
|
|
54
83
|
|
|
55
|
-
|
|
56
|
-
name:
|
|
57
|
-
runs-on: ubuntu-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
with:
|
|
65
|
-
python-version: "3.12"
|
|
66
|
-
- run: pipx install nox
|
|
67
|
-
- run: nox -s types
|
|
68
|
-
|
|
69
|
-
lint:
|
|
70
|
-
name: ruff
|
|
71
|
-
runs-on: ubuntu-latest
|
|
84
|
+
mysql:
|
|
85
|
+
name: mysql (py${{ matrix.python }}, mysql${{ matrix.mysql }})
|
|
86
|
+
runs-on: ubuntu-24.04
|
|
87
|
+
needs: [lint, types, unit]
|
|
88
|
+
strategy:
|
|
89
|
+
fail-fast: false
|
|
90
|
+
matrix:
|
|
91
|
+
python: ["3.12", "3.13"]
|
|
92
|
+
mysql: ["8.0", "8.4"]
|
|
72
93
|
steps:
|
|
73
|
-
- uses: actions/checkout@
|
|
94
|
+
- uses: actions/checkout@v7
|
|
74
95
|
- uses: astral-sh/setup-uv@v7
|
|
75
96
|
with:
|
|
76
97
|
enable-cache: true
|
|
77
98
|
- uses: actions/setup-python@v6
|
|
78
99
|
with:
|
|
79
|
-
python-version:
|
|
100
|
+
python-version: ${{ matrix.python }}
|
|
101
|
+
- name: Install Oracle MySQL clients
|
|
102
|
+
run: |
|
|
103
|
+
sudo apt-get update
|
|
104
|
+
sudo apt-get install -y mysql-client
|
|
80
105
|
- run: pipx install nox
|
|
81
|
-
- run: nox -s
|
|
106
|
+
- run: nox -s "mysql-${{ matrix.python }}(mysql_image='mysql:${{ matrix.mysql }}')"
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
<!-- version list -->
|
|
9
|
+
|
|
10
|
+
## v0.3.0 (2026-09-26)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- Align database clients and validate release CI locally
|
|
15
|
+
([`56600a6`](https://github.com/earthcomfy/db-git/commit/56600a6b43873c44faa619275f2f6f7f2cd424c7))
|
|
16
|
+
|
|
17
|
+
- Prevent unsafe database switches and branch name collisions
|
|
18
|
+
([`8ae904e`](https://github.com/earthcomfy/db-git/commit/8ae904ed79d7862d5994dcac065be4bde6108fce))
|
|
19
|
+
|
|
20
|
+
### Build System
|
|
21
|
+
|
|
22
|
+
- **deps**: Bump actions/checkout from 6 to 7 ([#10](https://github.com/earthcomfy/db-git/pull/10),
|
|
23
|
+
[`8a7221a`](https://github.com/earthcomfy/db-git/commit/8a7221ad4b248c15a93349c1d58f7a965e9b65f0))
|
|
24
|
+
|
|
25
|
+
- **deps**: Bump https://github.com/astral-sh/ruff-pre-commit
|
|
26
|
+
([#11](https://github.com/earthcomfy/db-git/pull/11),
|
|
27
|
+
[`6ff3495`](https://github.com/earthcomfy/db-git/commit/6ff34959ba9655d173f47279ae155d89eb12b41d))
|
|
28
|
+
|
|
29
|
+
### Chores
|
|
30
|
+
|
|
31
|
+
- Update changelog
|
|
32
|
+
([`e135315`](https://github.com/earthcomfy/db-git/commit/e13531531c719345ebed747536a8594262b20ead))
|
|
33
|
+
|
|
34
|
+
### Documentation
|
|
35
|
+
|
|
36
|
+
- Add Material documentation site and Pages workflow
|
|
37
|
+
([`b3c0b04`](https://github.com/earthcomfy/db-git/commit/b3c0b04f17adc895cd329c705859eb7eddaaa957))
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
- Add application runner and explicit branch database sources
|
|
42
|
+
([`eab7f27`](https://github.com/earthcomfy/db-git/commit/eab7f27cf65e58c8fd7ebdad7779a2590c256003))
|
|
43
|
+
|
|
44
|
+
- Add checkpoint history and recoverable retention
|
|
45
|
+
([`3b495b8`](https://github.com/earthcomfy/db-git/commit/3b495b83cf51d207b20d1b4a6bd11d5ed8735395))
|
|
46
|
+
|
|
47
|
+
- Add doctor diagnostics and preserve PostgreSQL connection options
|
|
48
|
+
([`6abedd2`](https://github.com/earthcomfy/db-git/commit/6abedd24770a83f3635a5d2751fea3ba70a5d25b))
|
|
49
|
+
|
|
50
|
+
- Add MySQL databases, shared snapshots, and recoverable generations
|
|
51
|
+
([`124a63a`](https://github.com/earthcomfy/db-git/commit/124a63a8f96742eb8c757aff1b7104976e852cfd))
|
|
52
|
+
|
|
53
|
+
- Add recoverable database and snapshot operations
|
|
54
|
+
([`51ace0f`](https://github.com/earthcomfy/db-git/commit/51ace0fc1da9169d00c39aa39737a3860e4c5d31))
|
|
55
|
+
|
|
56
|
+
- Add SQLite per-branch databases and recoverable file generations
|
|
57
|
+
([`a42584c`](https://github.com/earthcomfy/db-git/commit/a42584c63ea7999c13acdcf907af3a14063861f4))
|
|
58
|
+
|
|
59
|
+
- Support Git worktrees with shared database ownership
|
|
60
|
+
([`701dc12`](https://github.com/earthcomfy/db-git/commit/701dc12c99c47e5d43a98bd4cd63bf805789a86b))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## v0.2.0 (2026-06-08)
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
|
|
67
|
+
- Introduced a new command `db-git url` that outputs the database connection URL
|
|
68
|
+
for the current or specified branch.
|
|
69
|
+
|
|
70
|
+
### Changed
|
|
71
|
+
|
|
72
|
+
- Enhanced `config.py` to provide clearer documentation for the database URL configuration.
|
|
73
|
+
|
|
74
|
+
## v0.1.1 (2026-06-01)
|
|
75
|
+
|
|
76
|
+
### Changed
|
|
77
|
+
|
|
78
|
+
- Renamed project, CLI, package imports, configuration files, environment
|
|
79
|
+
variables, hook metadata, and local state paths to `db-git`.
|
|
80
|
+
|
|
81
|
+
## v0.1.0 (2026-05-22)
|
|
82
|
+
|
|
83
|
+
### Added
|
|
84
|
+
|
|
85
|
+
- Initial `db-git` command-line interface.
|
|
86
|
+
- Git `post-checkout` hook installation, removal, enable, disable, and dispatch
|
|
87
|
+
support.
|
|
88
|
+
- Shared database mode for saving and restoring branch-specific snapshots.
|
|
89
|
+
- Per-branch database mode for creating one database per git branch.
|
|
90
|
+
- PostgreSQL backend with `template` and `pgdump` snapshot strategies.
|
|
91
|
+
- Active connection handling with `terminate` and `fail` policies.
|
|
92
|
+
- Manual commands for `save`, `restore`, `create`, `reset`, `list`, `status`,
|
|
93
|
+
and `prune`.
|
|
94
|
+
- Snapshot metadata and local state storage under `.git/db-git/`.
|
|
95
|
+
- Unit, integration, and end-to-end tests for CLI, storage, git hooks,
|
|
96
|
+
PostgreSQL strategies, and branch database workflows.
|
|
97
|
+
- Nox sessions, Ruff linting/format checks, mypy type checking, pre-commit
|
|
98
|
+
hooks, Dependabot, and GitHub Actions CI.
|
db_git-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: db-git
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Keep your database in sync with your git branches.
|
|
5
|
+
Project-URL: Homepage, https://github.com/earthcomfy/db-git
|
|
6
|
+
Project-URL: Documentation, https://earthcomfy.github.io/db-git/
|
|
7
|
+
Project-URL: Repository, https://github.com/earthcomfy/db-git
|
|
8
|
+
Project-URL: Issues, https://github.com/earthcomfy/db-git/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/earthcomfy/db-git/blob/main/CHANGELOG.md
|
|
10
|
+
Author: Hana Belay
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: branching,cli,database,developer-tools,git,migrations,postgresql,snapshot
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Database
|
|
23
|
+
Classifier: Topic :: Software Development :: Version Control :: Git
|
|
24
|
+
Classifier: Topic :: Utilities
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.12
|
|
27
|
+
Requires-Dist: psycopg[binary]>=3.3.0
|
|
28
|
+
Requires-Dist: rich>=14.0.0
|
|
29
|
+
Requires-Dist: tomlkit>=0.14.0
|
|
30
|
+
Requires-Dist: typer>=0.24.1
|
|
31
|
+
Provides-Extra: mysql
|
|
32
|
+
Requires-Dist: pymysql[rsa]>=1.1.1; extra == 'mysql'
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# db-git
|
|
36
|
+
|
|
37
|
+
[](https://github.com/earthcomfy/db-git/actions/workflows/test.yml)
|
|
38
|
+
[](https://pypi.org/project/db-git/)
|
|
39
|
+
[](https://github.com/earthcomfy/db-git/blob/main/LICENSE)
|
|
40
|
+
|
|
41
|
+
Keep your database in sync with your Git branches.
|
|
42
|
+
|
|
43
|
+
`db-git` is a developer tool for schema migrations, seed data, experimental
|
|
44
|
+
features, and branch switching during reviews. Its `post-checkout` hook keeps
|
|
45
|
+
your local database aligned with the branch you are working on.
|
|
46
|
+
|
|
47
|
+
**[Documentation](https://earthcomfy.github.io/db-git/)** ·
|
|
48
|
+
[Browse docs in GitHub](https://github.com/earthcomfy/db-git/tree/main/docs) ·
|
|
49
|
+
[Release notes](https://github.com/earthcomfy/db-git/blob/main/CHANGELOG.md)
|
|
50
|
+
|
|
51
|
+
## Features
|
|
52
|
+
|
|
53
|
+
- Automatic database handling on Git checkout.
|
|
54
|
+
- **Shared mode:** save and restore branch-specific snapshots.
|
|
55
|
+
- **Per-branch mode:** keep an independent database for each branch.
|
|
56
|
+
- Launch applications and migrations with `db-git run -- <command>`.
|
|
57
|
+
- Named checkpoints, history, and explicit retention in shared mode.
|
|
58
|
+
- Git worktrees in per-branch mode.
|
|
59
|
+
- Read-only diagnostics and recoverable database operations.
|
|
60
|
+
- Checkout still completes if database handling fails, with recovery guidance.
|
|
61
|
+
|
|
62
|
+
## Supported databases
|
|
63
|
+
|
|
64
|
+
| Database | Modes | Strategy |
|
|
65
|
+
| --- | --- | --- |
|
|
66
|
+
| PostgreSQL | Shared and per-branch | `template` or `pgdump` |
|
|
67
|
+
| MySQL 8.0 / 8.4 | Shared and per-branch | `mysqldump` |
|
|
68
|
+
| SQLite | Per-branch | Online backup |
|
|
69
|
+
|
|
70
|
+
See the [database guides](https://earthcomfy.github.io/db-git/#choose-your-database)
|
|
71
|
+
for required privileges, client tools, and engine-specific limitations.
|
|
72
|
+
|
|
73
|
+
## Quick start
|
|
74
|
+
|
|
75
|
+
Requires Python 3.12+, Git, and an existing local development database.
|
|
76
|
+
For PostgreSQL:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
uv tool install db-git # or pip install db-git
|
|
80
|
+
|
|
81
|
+
# Run inside your application's Git repository.
|
|
82
|
+
db-git init --database-url postgresql://localhost/myapp --mode per-branch
|
|
83
|
+
|
|
84
|
+
git checkout -b feature/auth
|
|
85
|
+
db-git run -- npm run dev # replace with your application's command
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Install the hook during initialization. Your application must read `DATABASE_URL`;
|
|
89
|
+
restart it through `db-git run` after switching branches. The default branch keeps
|
|
90
|
+
the seed database, while other branches receive separate copies.
|
|
91
|
+
|
|
92
|
+
For MySQL, install `uv tool install 'db-git[mysql]'` and follow the
|
|
93
|
+
[MySQL guide](https://github.com/earthcomfy/db-git/blob/main/docs/databases/mysql.md).
|
|
94
|
+
For SQLite, follow the [SQLite guide](https://github.com/earthcomfy/db-git/blob/main/docs/databases/sqlite.md).
|
|
95
|
+
|
|
96
|
+
## Learn more
|
|
97
|
+
|
|
98
|
+
- [Choose shared or per-branch mode](https://github.com/earthcomfy/db-git/blob/main/docs/concepts/modes.md)
|
|
99
|
+
- [Run applications and migrations](https://github.com/earthcomfy/db-git/blob/main/docs/guides/applications.md)
|
|
100
|
+
- [Work with Git worktrees](https://github.com/earthcomfy/db-git/blob/main/docs/guides/worktrees.md)
|
|
101
|
+
- [Save checkpoints and inspect history](https://github.com/earthcomfy/db-git/blob/main/docs/guides/checkpoints.md)
|
|
102
|
+
- [Command reference](https://github.com/earthcomfy/db-git/blob/main/docs/reference/commands.md)
|
|
103
|
+
- [Configuration](https://github.com/earthcomfy/db-git/blob/main/docs/reference/configuration.md)
|
|
104
|
+
- [Troubleshooting](https://github.com/earthcomfy/db-git/blob/main/docs/troubleshooting.md)
|
|
105
|
+
- [Recovery](https://github.com/earthcomfy/db-git/blob/main/docs/guides/recovery.md)
|
|
106
|
+
|
|
107
|
+
## Contributing
|
|
108
|
+
|
|
109
|
+
See the [development guide](https://github.com/earthcomfy/db-git/blob/main/docs/contributing/development.md)
|
|
110
|
+
for dependencies and tests, and the
|
|
111
|
+
[documentation guide](https://github.com/earthcomfy/db-git/blob/main/docs/contributing/documentation.md)
|
|
112
|
+
for local preview and publishing.
|
|
113
|
+
|
|
114
|
+
## License
|
|
115
|
+
|
|
116
|
+
[MIT](https://github.com/earthcomfy/db-git/blob/main/LICENSE)
|
db_git-0.3.0/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# db-git
|
|
2
|
+
|
|
3
|
+
[](https://github.com/earthcomfy/db-git/actions/workflows/test.yml)
|
|
4
|
+
[](https://pypi.org/project/db-git/)
|
|
5
|
+
[](https://github.com/earthcomfy/db-git/blob/main/LICENSE)
|
|
6
|
+
|
|
7
|
+
Keep your database in sync with your Git branches.
|
|
8
|
+
|
|
9
|
+
`db-git` is a developer tool for schema migrations, seed data, experimental
|
|
10
|
+
features, and branch switching during reviews. Its `post-checkout` hook keeps
|
|
11
|
+
your local database aligned with the branch you are working on.
|
|
12
|
+
|
|
13
|
+
**[Documentation](https://earthcomfy.github.io/db-git/)** ·
|
|
14
|
+
[Browse docs in GitHub](https://github.com/earthcomfy/db-git/tree/main/docs) ·
|
|
15
|
+
[Release notes](https://github.com/earthcomfy/db-git/blob/main/CHANGELOG.md)
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
- Automatic database handling on Git checkout.
|
|
20
|
+
- **Shared mode:** save and restore branch-specific snapshots.
|
|
21
|
+
- **Per-branch mode:** keep an independent database for each branch.
|
|
22
|
+
- Launch applications and migrations with `db-git run -- <command>`.
|
|
23
|
+
- Named checkpoints, history, and explicit retention in shared mode.
|
|
24
|
+
- Git worktrees in per-branch mode.
|
|
25
|
+
- Read-only diagnostics and recoverable database operations.
|
|
26
|
+
- Checkout still completes if database handling fails, with recovery guidance.
|
|
27
|
+
|
|
28
|
+
## Supported databases
|
|
29
|
+
|
|
30
|
+
| Database | Modes | Strategy |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| PostgreSQL | Shared and per-branch | `template` or `pgdump` |
|
|
33
|
+
| MySQL 8.0 / 8.4 | Shared and per-branch | `mysqldump` |
|
|
34
|
+
| SQLite | Per-branch | Online backup |
|
|
35
|
+
|
|
36
|
+
See the [database guides](https://earthcomfy.github.io/db-git/#choose-your-database)
|
|
37
|
+
for required privileges, client tools, and engine-specific limitations.
|
|
38
|
+
|
|
39
|
+
## Quick start
|
|
40
|
+
|
|
41
|
+
Requires Python 3.12+, Git, and an existing local development database.
|
|
42
|
+
For PostgreSQL:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
uv tool install db-git # or pip install db-git
|
|
46
|
+
|
|
47
|
+
# Run inside your application's Git repository.
|
|
48
|
+
db-git init --database-url postgresql://localhost/myapp --mode per-branch
|
|
49
|
+
|
|
50
|
+
git checkout -b feature/auth
|
|
51
|
+
db-git run -- npm run dev # replace with your application's command
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Install the hook during initialization. Your application must read `DATABASE_URL`;
|
|
55
|
+
restart it through `db-git run` after switching branches. The default branch keeps
|
|
56
|
+
the seed database, while other branches receive separate copies.
|
|
57
|
+
|
|
58
|
+
For MySQL, install `uv tool install 'db-git[mysql]'` and follow the
|
|
59
|
+
[MySQL guide](https://github.com/earthcomfy/db-git/blob/main/docs/databases/mysql.md).
|
|
60
|
+
For SQLite, follow the [SQLite guide](https://github.com/earthcomfy/db-git/blob/main/docs/databases/sqlite.md).
|
|
61
|
+
|
|
62
|
+
## Learn more
|
|
63
|
+
|
|
64
|
+
- [Choose shared or per-branch mode](https://github.com/earthcomfy/db-git/blob/main/docs/concepts/modes.md)
|
|
65
|
+
- [Run applications and migrations](https://github.com/earthcomfy/db-git/blob/main/docs/guides/applications.md)
|
|
66
|
+
- [Work with Git worktrees](https://github.com/earthcomfy/db-git/blob/main/docs/guides/worktrees.md)
|
|
67
|
+
- [Save checkpoints and inspect history](https://github.com/earthcomfy/db-git/blob/main/docs/guides/checkpoints.md)
|
|
68
|
+
- [Command reference](https://github.com/earthcomfy/db-git/blob/main/docs/reference/commands.md)
|
|
69
|
+
- [Configuration](https://github.com/earthcomfy/db-git/blob/main/docs/reference/configuration.md)
|
|
70
|
+
- [Troubleshooting](https://github.com/earthcomfy/db-git/blob/main/docs/troubleshooting.md)
|
|
71
|
+
- [Recovery](https://github.com/earthcomfy/db-git/blob/main/docs/guides/recovery.md)
|
|
72
|
+
|
|
73
|
+
## Contributing
|
|
74
|
+
|
|
75
|
+
See the [development guide](https://github.com/earthcomfy/db-git/blob/main/docs/contributing/development.md)
|
|
76
|
+
for dependencies and tests, and the
|
|
77
|
+
[documentation guide](https://github.com/earthcomfy/db-git/blob/main/docs/contributing/documentation.md)
|
|
78
|
+
for local preview and publishing.
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
[MIT](https://github.com/earthcomfy/db-git/blob/main/LICENSE)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Choose a mode
|
|
2
|
+
|
|
3
|
+
## Shared Mode
|
|
4
|
+
|
|
5
|
+
PostgreSQL shared mode keeps the name from the configured `database_url`.
|
|
6
|
+
MySQL shared mode selects a fresh working database URL on restore; restart apps
|
|
7
|
+
through `db-git run` afterward.
|
|
8
|
+
|
|
9
|
+
Use this when:
|
|
10
|
+
|
|
11
|
+
- You want one active working database and branch-specific snapshots
|
|
12
|
+
- You restart applications after restoring or switching branches
|
|
13
|
+
|
|
14
|
+
## Per-Branch Mode
|
|
15
|
+
|
|
16
|
+
Per-branch mode creates a separate database for each branch. The configured
|
|
17
|
+
default branch keeps the original database name and acts as the seed database.
|
|
18
|
+
|
|
19
|
+
Use this when:
|
|
20
|
+
|
|
21
|
+
- You want branch databases to persist independently
|
|
22
|
+
- You prefer creating new databases over repeatedly restoring one shared
|
|
23
|
+
database
|
|
24
|
+
|
|
25
|
+
SQLite supports only per-branch mode. Multiple Git worktrees also require
|
|
26
|
+
per-branch mode. See [worktrees](../guides/worktrees.md) for setup and shared state.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Development
|
|
2
|
+
|
|
3
|
+
Install dependencies:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
uv sync --group dev
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Run checks:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv run ruff check .
|
|
13
|
+
uv run mypy src
|
|
14
|
+
uv run pytest tests/unit tests/sqlite
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
For MySQL development, install its optional driver and Oracle MySQL clients, then
|
|
18
|
+
run the Docker-backed workflow and recovery tests against each supported server:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
uv sync --group dev --extra mysql
|
|
22
|
+
DB_GIT_TEST_MYSQL_IMAGE=mysql:8.0 uv run pytest tests/mysql
|
|
23
|
+
DB_GIT_TEST_MYSQL_IMAGE=mysql:8.4 uv run pytest tests/mysql
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
CI runs both MySQL workflows, stored-object cloning, and recovery tests on
|
|
27
|
+
Python 3.12 and 3.13 against MySQL 8.0 and 8.4.
|
|
28
|
+
|
|
29
|
+
Run the full nox suite:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
nox
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Run the CI matrix locally
|
|
36
|
+
|
|
37
|
+
To catch differences between macOS tools and the Linux CI environment, use the
|
|
38
|
+
local runner from the repository root with Docker running:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
python3 scripts/ci/local.py
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
It builds an Ubuntu 24.04 image, includes uncommitted source changes, and runs
|
|
45
|
+
the same nox sessions for Python 3.12/3.13, PostgreSQL 13–17, and MySQL 8.0/8.4.
|
|
46
|
+
PostgreSQL sessions select their matching client binaries; MySQL uses Ubuntu's
|
|
47
|
+
Oracle MySQL 8.0 clients. The checkout and its virtual environments stay untouched.
|
|
48
|
+
Logs and a JSON result summary are written to the temporary directory printed
|
|
49
|
+
by the runner. The command exits nonzero when a session fails.
|
|
50
|
+
|
|
51
|
+
The default is one job at a time with an x86-64 Linux test runner. GitHub gives
|
|
52
|
+
each matrix job its own machine; local jobs share Docker's CPU and memory with
|
|
53
|
+
your other containers. On Apple Silicon, emulation adds overhead, and concurrent
|
|
54
|
+
database suites can encounter transient connection failures. Select a specific
|
|
55
|
+
session, or increase concurrency when your machine has sufficient resources:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
python3 scripts/ci/local.py --jobs 4
|
|
59
|
+
python3 scripts/ci/local.py --session "integration-3.12(pg_image='postgres:15')"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The runner uses the local Docker socket to create disposable test databases.
|
|
63
|
+
It validates test jobs, not GitHub authentication, caching, Pages deployment,
|
|
64
|
+
or PyPI publication. Database image architecture follows the Docker daemon;
|
|
65
|
+
the hosted runner's exact package patch versions may also differ over time.
|
|
66
|
+
|
|
67
|
+
See [documentation development](documentation.md) to preview and publish the site.
|