Skip to content

Commit

Permalink
Show version and platform info in one place
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EliahKagan committed Sep 25, 2023
1 parent 45773c2 commit 6fbe511
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/cygwin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ jobs:
with:
packages: python39 python39-pip python39-virtualenv git

- name: Show python and git versions
run: |
/usr/bin/python --version
/usr/bin/git version
- name: Tell git to trust this repo
run: |
/usr/bin/git config --global --add safe.directory "$(pwd)"
Expand All @@ -58,9 +53,13 @@ jobs:
run: |
/usr/bin/python -m pip install ".[test]"
- name: Check 'is_win'
- name: Show version and platform information
run: |
/usr/bin/python -c 'import os, git; print(f"os.name={os.name}, is_win={git.compat.is_win}")'
/usr/bin/git version
/usr/bin/python --version
/usr/bin/python -c 'import sys; print(sys.platform)'
/usr/bin/python -c 'import os; print(os.name)'
/usr/bin/python -c 'import git; print(git.compat.is_win)'
- name: Test with pytest
run: |
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ jobs:
python-version: ${{ matrix.python-version }}
allow-prereleases: ${{ matrix.experimental }}

- name: Show python and git versions
run: |
python --version
git version
- name: Prepare this repo for tests
run: |
TRAVIS=yes ./init-tests-after-clone.sh
Expand All @@ -66,17 +61,21 @@ jobs:
run: |
pip install ".[test]"
- name: Show version and platform information
run: |
git version
python --version
python -c 'import sys; print(sys.platform)'
python -c 'import os; print(os.name)'
python -c 'import git; print(git.compat.is_win)'
- name: Check types with mypy
run: |
mypy -p git
# With new versions of mypy new issues might arise. This is a problem if there is nobody able to fix them,
# so we have to ignore errors until that changes.
continue-on-error: true

- name: Check 'is_win'
run: |
python -c 'import os, git; print(f"os.name={os.name}, is_win={git.compat.is_win}")'
- name: Test with pytest
run: |
pytest -v
Expand Down

0 comments on commit 6fbe511

Please sign in to comment.