Skip to content

Commit 6fbe511

Browse files
committed
Show version and platform info in one place
Instead of splitting it in into two places where at least one of the places is highly likely to be missed, this puts it together just before the first steps that makes nontrivial use of the installed packages. Grouping it together, it can't really be shown earlier, because one of the pieces of information is obtained using the git module (to examine that behavior of the code). This also presents the information more clearly. "set -x" makes this easy, so the commands are rewritten to take advantage of it.
1 parent 45773c2 commit 6fbe511

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

.github/workflows/cygwin-test.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ jobs:
2929
with:
3030
packages: python39 python39-pip python39-virtualenv git
3131

32-
- name: Show python and git versions
33-
run: |
34-
/usr/bin/python --version
35-
/usr/bin/git version
36-
3732
- name: Tell git to trust this repo
3833
run: |
3934
/usr/bin/git config --global --add safe.directory "$(pwd)"
@@ -58,9 +53,13 @@ jobs:
5853
run: |
5954
/usr/bin/python -m pip install ".[test]"
6055
61-
- name: Check 'is_win'
56+
- name: Show version and platform information
6257
run: |
63-
/usr/bin/python -c 'import os, git; print(f"os.name={os.name}, is_win={git.compat.is_win}")'
58+
/usr/bin/git version
59+
/usr/bin/python --version
60+
/usr/bin/python -c 'import sys; print(sys.platform)'
61+
/usr/bin/python -c 'import os; print(os.name)'
62+
/usr/bin/python -c 'import git; print(git.compat.is_win)'
6463
6564
- name: Test with pytest
6665
run: |

.github/workflows/pythonpackage.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ jobs:
3636
python-version: ${{ matrix.python-version }}
3737
allow-prereleases: ${{ matrix.experimental }}
3838

39-
- name: Show python and git versions
40-
run: |
41-
python --version
42-
git version
43-
4439
- name: Prepare this repo for tests
4540
run: |
4641
TRAVIS=yes ./init-tests-after-clone.sh
@@ -66,17 +61,21 @@ jobs:
6661
run: |
6762
pip install ".[test]"
6863
64+
- name: Show version and platform information
65+
run: |
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)'
71+
6972
- name: Check types with mypy
7073
run: |
7174
mypy -p git
7275
# With new versions of mypy new issues might arise. This is a problem if there is nobody able to fix them,
7376
# so we have to ignore errors until that changes.
7477
continue-on-error: true
7578

76-
- name: Check 'is_win'
77-
run: |
78-
python -c 'import os, git; print(f"os.name={os.name}, is_win={git.compat.is_win}")'
79-
8079
- name: Test with pytest
8180
run: |
8281
pytest -v

0 commit comments

Comments
 (0)