@@ -5,20 +5,24 @@ on: [push, pull_request, workflow_dispatch]
55jobs :
66 build :
77 runs-on : windows-latest
8+
89 strategy :
910 fail-fast : false
11+
1012 env :
1113 CHERE_INVOKING : 1
12- SHELLOPTS : igncr
1314 TMP : " /tmp"
1415 TEMP : " /tmp"
16+
1517 defaults :
1618 run :
17- shell : bash.exe --noprofile --norc -exo pipefail -o igncr "{0}"
19+ shell : C:\cygwin\bin\ bash.exe --noprofile --norc -exo pipefail -o igncr "{0}"
1820
1921 steps :
2022 - name : Force LF line endings
21- run : git config --global core.autocrlf input
23+ run : |
24+ git config --global core.autocrlf false # Affects the non-Cygwin git.
25+ shell : bash
2226
2327 - uses : actions/checkout@v4
2428 with :
@@ -29,36 +33,42 @@ jobs:
2933 with :
3034 packages : python39 python39-pip python39-virtualenv git
3135
32- - name : Show python and git versions
36+ - name : Special configuration for Cygwin's git
3337 run : |
34- /usr/bin/python --version
35- /usr/bin/git version
36-
37- - name : Tell git to trust this repo
38- run : |
39- /usr/bin/git config --global --add safe.directory "$(pwd)"
38+ git config --global --add safe.directory "$(pwd)"
39+ git config --global core.autocrlf false
4040
4141 - name : Prepare this repo for tests
4242 run : |
43- TRAVIS=yes ./init-tests-after-clone.sh
43+ ./init-tests-after-clone.sh
4444
45- - name : Further prepare git configuration for tests
45+ - name : Set git user identity and command aliases for the tests
4646 run : |
47- /usr/bin/ git config --global user.email "travis@ci.com"
48- /usr/bin/ git config --global user.name "Travis Runner"
47+ git config --global user.email "travis@ci.com"
48+ git config --global user.name "Travis Runner"
4949 # If we rewrite the user's config by accident, we will mess it up
5050 # and cause subsequent tests to fail
5151 cat test/fixtures/.gitconfig >> ~/.gitconfig
5252
5353 - name : Update PyPA packages
5454 run : |
55- /usr/bin/python -m pip install --upgrade pip setuptools wheel
55+ # Get the latest pip, wheel, and prior to Python 3.12, setuptools.
56+ python -m pip install -U pip $(pip freeze --all | grep -oF setuptools) wheel
5657
5758 - name : Install project and test dependencies
5859 run : |
59- /usr/bin/python -m pip install ".[test]"
60+ python -m pip install ".[test]"
61+
62+ - name : Show version and platform information
63+ run : |
64+ uname -a
65+ command -v git python
66+ git version
67+ python --version
68+ python -c 'import sys; print(sys.platform)'
69+ python -c 'import os; print(os.name)'
70+ python -c 'import git; print(git.compat.is_win)'
6071
6172 - name : Test with pytest
6273 run : |
63- set +x
64- /usr/bin/python -m pytest
74+ python -m pytest --color=yes -p no:sugar --instafail -vv
0 commit comments