Skip to content

Commit

Permalink
force bash for pypi tests even on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
yurijmikhalevich committed Feb 21, 2025
1 parent d47bb07 commit 69ec33e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/actions/test-system-rclip/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ inputs:
description: 'Python version to use'
required: false
default: '3.10'
force-bash:
description: 'Force using bash instead of PowerShell on Windows'
required: false
default: false

runs:
using: 'composite'
Expand All @@ -24,11 +28,11 @@ runs:
# here and below, on Windows, we set the latest PATH to ensure that the
# action can find system rclip
# on other OSes, we pass -ieo pipefail to bash to ensure it reads the .bashrc
shell: ${{ runner.os == 'Windows' && 'powershell -NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command "$env:Path = [Environment]::GetEnvironmentVariable(''Path'', ''Machine'') + '';'' + [Environment]::GetEnvironmentVariable(''Path'', ''User''); & {0}"' || 'bash -ieo pipefail {0}' }}
shell: ${{ (runner.os != 'Windows' || inputs.force-bash == 'true') && 'bash -ieo pipefail {0}' || 'powershell -NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command "$env:Path = [Environment]::GetEnvironmentVariable(''Path'', ''Machine'') + '';'' + [Environment]::GetEnvironmentVariable(''Path'', ''User''); & {0}"' }}
- name: Print tested rclip version
run: |
which rclip
rclip --version
shell: ${{ runner.os == 'Windows' && 'powershell -NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command "$env:Path = [Environment]::GetEnvironmentVariable(''Path'', ''Machine'') + '';'' + [Environment]::GetEnvironmentVariable(''Path'', ''User''); & {0}"' || 'bash -ieo pipefail {0}' }}
shell: ${{ (runner.os != 'Windows' || inputs.force-bash == 'true') && 'bash -ieo pipefail {0}' || 'powershell -NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command "$env:Path = [Environment]::GetEnvironmentVariable(''Path'', ''Machine'') + '';'' + [Environment]::GetEnvironmentVariable(''Path'', ''User''); & {0}"' }}
- run: make test-system-rclip
shell: ${{ runner.os == 'Windows' && 'powershell -NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command "$env:Path = [Environment]::GetEnvironmentVariable(''Path'', ''Machine'') + '';'' + [Environment]::GetEnvironmentVariable(''Path'', ''User''); & {0}"' || 'bash -ieo pipefail {0}' }}
shell: ${{ (runner.os != 'Windows' || inputs.force-bash == 'true') && 'bash -ieo pipefail {0}' || 'powershell -NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command "$env:Path = [Environment]::GetEnvironmentVariable(''Path'', ''Machine'') + '';'' + [Environment]::GetEnvironmentVariable(''Path'', ''User''); & {0}"' }}
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
- uses: ./.github/actions/test-system-rclip
with:
python: ${{ matrix.python }}
force-bash: true

pypi-release:
needs: pypi-test
Expand Down

0 comments on commit 69ec33e

Please sign in to comment.