From 1098f9f673b72912061b16fa37909e75eb158187 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Mon, 25 Sep 2023 10:49:50 -0400 Subject: [PATCH] Try to use Cygwin for more CI steps --- .github/workflows/cygwin-test.yml | 39 +++++++++++++++++------------ .github/workflows/pythonpackage.yml | 1 + 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cygwin-test.yml b/.github/workflows/cygwin-test.yml index d0be6bc39..91eeb60a2 100644 --- a/.github/workflows/cygwin-test.yml +++ b/.github/workflows/cygwin-test.yml @@ -14,11 +14,18 @@ jobs: 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 input + shell: bash + + - name: Tell git to trust this repo + run: | + git config --global --add safe.directory "$(pwd)" + shell: bash - uses: actions/checkout@v4 with: @@ -29,9 +36,8 @@ jobs: with: packages: python39 python39-pip python39-virtualenv git - - name: Tell git to trust this repo - run: | - /usr/bin/git config --global --add safe.directory "$(pwd)" + - name: Limit $PATH to Cygwin + run: echo 'C:\cygwin\bin' >"$GITHUB_PATH" - name: Prepare this repo for tests run: | @@ -39,30 +45,31 @@ jobs: - name: Further prepare git configuration for tests run: | - /usr/bin/git config --global user.email "travis@ci.com" - /usr/bin/git config --global user.name "Travis Runner" + git config --global user.email "travis@ci.com" + 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 + python -m pip install --upgrade pip 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: | - /usr/bin/uname -a - /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)' + 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 --color=yes -p no:sugar --instafail -vv + python -m pytest --color=yes -p no:sugar --instafail -vv diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 0dc9d217a..78d3ddf86 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -64,6 +64,7 @@ jobs: - name: Show version and platform information run: | uname -a + command -v git python git version python --version python -c 'import sys; print(sys.platform)'