-
-
Notifications
You must be signed in to change notification settings - Fork 906
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1679 from EliahKagan/verbose-ci
Make clear every test's status in every CI run
- Loading branch information
Showing
13 changed files
with
119 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,20 +5,24 @@ on: [push, pull_request, workflow_dispatch] | |
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
env: | ||
CHERE_INVOKING: 1 | ||
SHELLOPTS: igncr | ||
TMP: "/tmp" | ||
TEMP: "/tmp" | ||
|
||
defaults: | ||
run: | ||
shell: bash.exe --noprofile --norc -exo pipefail -o igncr "{0}" | ||
shell: C:\cygwin\bin\bash.exe --noprofile --norc -exo pipefail -o igncr "{0}" | ||
|
||
steps: | ||
- name: Force LF line endings | ||
run: git config --global core.autocrlf input | ||
run: | | ||
git config --global core.autocrlf false # Affects the non-Cygwin git. | ||
shell: bash | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -29,36 +33,42 @@ jobs: | |
with: | ||
packages: python39 python39-pip python39-virtualenv git | ||
|
||
- name: Show python and git versions | ||
- name: Special configuration for Cygwin's git | ||
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)" | ||
git config --global --add safe.directory "$(pwd)" | ||
git config --global core.autocrlf false | ||
- name: Prepare this repo for tests | ||
run: | | ||
TRAVIS=yes ./init-tests-after-clone.sh | ||
- name: Further prepare git configuration for tests | ||
- name: Set git user identity and command aliases for the tests | ||
run: | | ||
/usr/bin/git config --global user.email "[email protected]" | ||
/usr/bin/git config --global user.name "Travis Runner" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Travis Runner" | ||
# If we rewrite the user's config by accident, we will mess it up | ||
# and cause subsequent tests to fail | ||
cat test/fixtures/.gitconfig >> ~/.gitconfig | ||
- name: Update PyPA packages | ||
run: | | ||
/usr/bin/python -m pip install --upgrade pip setuptools wheel | ||
# Get the latest pip, wheel, and prior to Python 3.12, setuptools. | ||
python -m pip install -U pip $(pip freeze --all | grep -oF setuptools) wheel | ||
- name: Install project and test dependencies | ||
run: | | ||
/usr/bin/python -m pip install ".[test]" | ||
python -m pip install ".[test]" | ||
- name: Show version and platform information | ||
run: | | ||
uname -a | ||
command -v git python | ||
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: Test with pytest | ||
run: | | ||
set +x | ||
/usr/bin/python -m pytest | ||
python -m pytest --color=yes -p no:sugar --instafail -vv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- uses: pre-commit/[email protected] | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- uses: pre-commit/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,8 @@ permissions: | |
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -20,6 +20,7 @@ jobs: | |
- experimental: false | ||
- python-version: "3.12" | ||
experimental: true | ||
|
||
defaults: | ||
run: | ||
shell: /bin/bash --noprofile --norc -exo pipefail {0} | ||
|
@@ -36,16 +37,11 @@ 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 | ||
- name: Prepare git configuration for tests | ||
- name: Set git user identity and command aliases for the tests | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Travis Runner" | ||
|
@@ -55,17 +51,23 @@ jobs: | |
- name: Update PyPA packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
if pip freeze --all | grep --quiet '^setuptools=='; then | ||
# Python prior to 3.12 ships setuptools. Upgrade it if present. | ||
python -m pip install --upgrade setuptools | ||
fi | ||
python -m pip install --upgrade wheel | ||
# Get the latest pip, wheel, and prior to Python 3.12, setuptools. | ||
python -m pip install -U pip $(pip freeze --all | grep -oF setuptools) wheel | ||
- name: Install project and test dependencies | ||
run: | | ||
pip install ".[test]" | ||
- name: Show version and platform information | ||
run: | | ||
uname -a | ||
command -v git python | ||
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 | ||
|
@@ -75,7 +77,7 @@ jobs: | |
|
||
- name: Test with pytest | ||
run: | | ||
pytest | ||
pytest --color=yes -p no:sugar --instafail -vv | ||
continue-on-error: false | ||
|
||
- name: Documentation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ mypy | |
pre-commit | ||
pytest | ||
pytest-cov | ||
pytest-instafail | ||
pytest-sugar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.