@@ -5,20 +5,24 @@ on: [push, pull_request, workflow_dispatch]
55jobs :
66build :
77runs-on :windows-latest
8+
89strategy :
910fail-fast :false
11+
1012env :
1113CHERE_INVOKING :1
12- SHELLOPTS :igncr
1314TMP :" /tmp"
1415TEMP :" /tmp"
16+
1517defaults :
1618run :
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
1921steps :
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
2428with :
@@ -29,36 +33,42 @@ jobs:
2933with :
3034packages :python39 python39-pip python39-virtualenv git
3135
32- -name :Show python and git versions
36+ -name :Special configuration for Cygwin's git
3337run :|
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.autocrlffalse
4040
4141 -name :Prepare this repo for tests
4242run :|
43- TRAVIS=yes ./init-tests-after-clone.sh
43+ ./init-tests-after-clone.sh
4444
45- -name :Further prepare gitconfiguration for tests
45+ -name :Set gituser identity and command aliases for the tests
4646run :|
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
5454run :|
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
5859run :|
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
6273run :|
63- set +x
64- /usr/bin/python -m pytest
74+ python -m pytest --color=yes -p no:sugar --instafail -vv