Repository navigation
Git3 Compat + gix speedup for GitPython #45
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: Minimum Git CLI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| git-2-52: | |
| runs-on: ubuntu-latest | |
| env: | |
| GIT_PYTHON_BACKEND: cli | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/checkout@v7 | |
| with: | |
| repository: git/git | |
| ref: v2.52.0 | |
| path: .git-source | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: '3.12' | |
| - name: Build minimum supported Git | |
| working-directory: .git-source | |
| run: | | |
| make -j2 prefix="$RUNNER_TEMP/git" NO_GETTEXT=YesPlease NO_TCLTK=YesPlease NO_PERL=YesPlease NO_CURL=YesPlease install | |
| echo "$RUNNER_TEMP/git/bin" >> "$GITHUB_PATH" | |
| - name: Prepare Rust for fixture tooling | |
| run: | | |
| rustup update stable | |
| rustup default stable | |
| echo "CARGO_TARGET_DIR=$RUNNER_TEMP/gix-target" >> "$GITHUB_ENV" | |
| - name: Cache GixPython builds | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| ${{ runner.temp }}/gix-target | |
| ~/.cache/pip | |
| key: minimum-git-gix-${{ runner.os }}-${{ hashFiles('gix-requirements.txt') }} | |
| - name: Install GitPython and test dependencies | |
| run: | | |
| python -m pip install ./smmap ./gitdb '.[test]' | |
| python -c 'from gix import testtools' | |
| - name: Verify native format and safety contracts | |
| env: | |
| GIT_CONFIG_NOSYSTEM: '1' | |
| GIT_CONFIG_GLOBAL: /dev/null | |
| GIT_AUTHOR_NAME: GitPython Tests | |
| GIT_AUTHOR_EMAIL: tests@example.invalid | |
| GIT_COMMITTER_NAME: GitPython Tests | |
| GIT_COMMITTER_EMAIL: tests@example.invalid | |
| run: | | |
| git version | |
| python -m pytest --no-cov --tb=short test/test_cli_objects_index.py test/test_cli_safety.py test/test_reflog.py test/test_config.py test/test_remote_cli.py test/test_submodule.py::test_submodule_cli_lifecycle |