| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d5fb280 commit ce68322
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,63 +20,73 @@ jobs: | |||
| 20 | 20 | ||
| 21 | 21 | runs-on: windows-latest | |
| 22 | 22 | ||
| 23 | - env: | ||
| 23 | + env: &cygwin-env | ||
| 24 | 24 | CHERE_INVOKING: "1" | |
| 25 | 25 | CYGWIN_NOWINPATH: "1" | |
| 26 | 26 | ||
| 27 | - defaults: | ||
| 27 | + defaults: &cygwin-defaults | ||
| 28 | 28 | run: | |
| 29 | 29 | shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr "{0}" | |
| 30 | 30 | ||
| 31 | 31 | steps: | |
| 32 | - - name: Force LF line endings | ||
| 32 | + - &force-lf | ||
| 33 | + name: Force LF line endings | ||
| 33 | 34 | run: | | |
| 34 | 35 | git config --global core.autocrlf false # Affects the non-Cygwin git. | |
| 35 | 36 | shell: pwsh # Do this outside Cygwin, to affect actions/checkout. | |
| 36 | 37 | ||
| 37 | - - uses: actions/checkout@v6 | ||
| 38 | + - &checkout | ||
| 39 | + uses: actions/checkout@v6 | ||
| 38 | 40 | with: | |
| 39 | 41 | fetch-depth: 0 | |
| 40 | 42 | ||
| 41 | - - name: Install Cygwin | ||
| 43 | + - &install-cygwin | ||
| 44 | + name: Install Cygwin | ||
| 42 | 45 | uses: cygwin/cygwin-install-action@v6 | |
| 43 | 46 | with: | |
| 44 | 47 | packages: git python39 python-pip-wheel python-setuptools-wheel python-wheel-wheel | |
| 45 | 48 | add-to-path: false # No need to change $PATH outside the Cygwin environment. | |
| 46 | 49 | ||
| 47 | - - name: Arrange for verbose output | ||
| 50 | + - &verbose-output | ||
| 51 | + name: Arrange for verbose output | ||
| 48 | 52 | run: | | |
| 49 | 53 | # Arrange for verbose output but without shell environment setup details. | |
| 50 | 54 | echo 'set -x' >~/.bash_profile | |
| 51 | 55 | ||
| 52 | - - name: Special configuration for Cygwin git | ||
| 56 | + - &safe-directory | ||
| 57 | + name: Special configuration for Cygwin git | ||
| 53 | 58 | run: | | |
| 54 | 59 | git config --global --add safe.directory "$(pwd)" | |
| 55 | 60 | git config --global --add safe.directory "$(pwd)/.git" | |
| 56 | 61 | git config --global core.autocrlf false | |
| 57 | 62 | ||
| 58 | - - name: Prepare this repo for tests | ||
| 63 | + - &prepare-repo | ||
| 64 | + name: Prepare this repo for tests | ||
| 59 | 65 | run: | | |
| 60 | 66 | ./init-tests-after-clone.sh | |
| 61 | 67 | ||
| 62 | - - name: Set git user identity and command aliases for the tests | ||
| 68 | + - &git-identity | ||
| 69 | + name: Set git user identity and command aliases for the tests | ||
| 63 | 70 | run: | | |
| 64 | 71 | git config --global user.email "travis@ci.com" | |
| 65 | 72 | git config --global user.name "Travis Runner" | |
| 66 | 73 | # If we rewrite the user's config by accident, we will mess it up | |
| 67 | 74 | # and cause subsequent tests to fail | |
| 68 | 75 | cat test/fixtures/.gitconfig >> ~/.gitconfig | |
| 69 | 76 | ||
| 70 | - - name: Set up virtual environment | ||
| 77 | + - &setup-venv | ||
| 78 | + name: Set up virtual environment | ||
| 71 | 79 | run: | | |
| 72 | 80 | python3.9 -m venv .venv | |
| 73 | 81 | echo 'BASH_ENV=.venv/bin/activate' >>"$GITHUB_ENV" | |
| 74 | 82 | ||
| 75 | - - name: Update PyPA packages | ||
| 83 | + - &update-pypa | ||
| 84 | + name: Update PyPA packages | ||
| 76 | 85 | run: | | |
| 77 | 86 | python -m pip install -U pip 'setuptools; python_version<"3.12"' wheel | |
| 78 | 87 | ||
| 79 | - - name: Install project and test dependencies | ||
| 88 | + - &install-deps | ||
| 89 | + name: Install project and test dependencies | ||
| 80 | 90 | run: | | |
| 81 | 91 | pip install '.[test]' | |
| 82 | 92 | ||
@@ -91,3 +101,34 @@ jobs: | |||
| 91 | 101 | - name: Test with pytest (${{ matrix.additional-pytest-args }}) | |
| 92 | 102 | run: | | |
| 93 | 103 | pytest --color=yes -p no:sugar --instafail -vv ${{ matrix.additional-pytest-args }} | |
| 104 | + | ||
| 105 | + reproduce-safe-dir: | ||
| 106 | + strategy: | ||
| 107 | + matrix: | ||
| 108 | + run: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256] | ||
| 109 | + fail-fast: false | ||
| 110 | + | ||
| 111 | + runs-on: windows-latest | ||
| 112 | + | ||
| 113 | + env: *cygwin-env | ||
| 114 | + | ||
| 115 | + defaults: *cygwin-defaults | ||
| 116 | + | ||
| 117 | + steps: | ||
| 118 | + - *force-lf | ||
| 119 | + - *checkout | ||
| 120 | + - *install-cygwin | ||
| 121 | + - *verbose-output | ||
| 122 | + - *safe-directory | ||
| 123 | + - *prepare-repo | ||
| 124 | + - *git-identity | ||
| 125 | + - *setup-venv | ||
| 126 | + - *update-pypa | ||
| 127 | + - *install-deps | ||
| 128 | + | ||
| 129 | + - name: Run submodule tests | ||
| 130 | + run: | | ||
| 131 | + python -m pytest -vv \ | ||
| 132 | + test/test_docs.py::Tutorials::test_submodules \ | ||
| 133 | + test/test_repo.py::TestRepo::test_submodules \ | ||
| 134 | + test/test_submodule.py::TestSubmodule::test_root_module | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,9 +6,6 @@ | |||
| 6 | 6 | import gc | |
| 7 | 7 | import os | |
| 8 | 8 | import os.path | |
| 9 | - import sys | ||
| 10 | - | ||
| 11 | - import pytest | ||
| 12 | 9 | ||
| 13 | 10 | from test.lib import TestBase | |
| 14 | 11 | from test.lib.helper import with_rw_directory | |
@@ -478,11 +475,6 @@ def test_references_and_objects(self, rw_dir): | |||
| 478 | 475 | ||
| 479 | 476 | repo.git.clear_cache() | |
| 480 | 477 | ||
| 481 | - @pytest.mark.xfail( | ||
| 482 | - sys.platform == "cygwin", | ||
| 483 | - reason="Cygwin GitPython can't find SHA for submodule", | ||
| 484 | - raises=ValueError, | ||
| 485 | - ) | ||
| 486 | 478 | def test_submodules(self): | |
| 487 | 479 | # [1-test_submodules] | |
| 488 | 480 | repo = self.rorepo | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -877,11 +877,6 @@ def test_repo_odbtype(self): | |||
| 877 | 877 | target_type = GitCmdObjectDB | |
| 878 | 878 | self.assertIsInstance(self.rorepo.odb, target_type) | |
| 879 | 879 | ||
| 880 | - @pytest.mark.xfail( | ||
| 881 | - sys.platform == "cygwin", | ||
| 882 | - reason="Cygwin GitPython can't find submodule SHA", | ||
| 883 | - raises=ValueError, | ||
| 884 | - ) | ||
| 885 | 880 | def test_submodules(self): | |
| 886 | 881 | self.assertEqual(len(self.rorepo.submodules), 1) # non-recursive | |
| 887 | 882 | self.assertGreaterEqual(len(list(self.rorepo.iter_submodules())), 2) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -480,11 +480,6 @@ def test_base_rw(self, rwrepo): | |||
| 480 | 480 | def test_base_bare(self, rwrepo): | |
| 481 | 481 | self._do_base_tests(rwrepo) | |
| 482 | 482 | ||
| 483 | - @pytest.mark.xfail( | ||
| 484 | - sys.platform == "cygwin", | ||
| 485 | - reason="Cygwin GitPython can't find submodule SHA", | ||
| 486 | - raises=ValueError, | ||
| 487 | - ) | ||
| 488 | 483 | @pytest.mark.xfail( | |
| 489 | 484 | HIDE_WINDOWS_KNOWN_ERRORS, | |
| 490 | 485 | reason=( | |
| Back | FazBrowse Home | New Git URL |
0 commit comments