@@ -5,20 +5,24 @@ on: [push, pull_request, workflow_dispatch]
5
5
jobs :
6
6
build :
7
7
runs-on :windows-latest
8
+
8
9
strategy :
9
10
fail-fast :false
11
+
10
12
env :
11
13
CHERE_INVOKING :1
12
- SHELLOPTS :igncr
13
14
TMP :" /tmp"
14
15
TEMP :" /tmp"
16
+
15
17
defaults :
16
18
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}"
18
20
19
21
steps :
20
22
-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
22
26
23
27
-uses :actions/checkout@v4
24
28
with :
@@ -29,36 +33,42 @@ jobs:
29
33
with :
30
34
packages :python39 python39-pip python39-virtualenv git
31
35
32
- -name :Show python and git versions
36
+ -name :Special configuration for Cygwin's git
33
37
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.autocrlffalse
40
40
41
41
-name :Prepare this repo for tests
42
42
run :|
43
- TRAVIS=yes ./init-tests-after-clone.sh
43
+ ./init-tests-after-clone.sh
44
44
45
- -name :Further prepare gitconfiguration for tests
45
+ -name :Set gituser identity and command aliases for the tests
46
46
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"
49
49
# If we rewrite the user's config by accident, we will mess it up
50
50
# and cause subsequent tests to fail
51
51
cat test/fixtures/.gitconfig >> ~/.gitconfig
52
52
53
53
-name :Update PyPA packages
54
54
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
56
57
57
58
-name :Install project and test dependencies
58
59
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)'
60
71
61
72
-name :Test with pytest
62
73
run :|
63
- set +x
64
- /usr/bin/python -m pytest
74
+ python -m pytest --color=yes -p no:sugar --instafail -vv