Skip to content

Commit 2e4813c

Browse files
committed
Fix syntax
1 parent 3898c48 commit 2e4813c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/test-python-install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949

5050
- name: Check if test dependency exists after execution
5151
description: "If use-external-python is set, then python test package should be installed. False otherwise"
52-
run:
52+
run: |
5353
pip freeze > all-deps.txt
5454
should_appear=$( if [[ "${{ matrix.use-external-python }}" == "true" ]]; then echo 0; else echo 1; fi )
5555
line_exists=$( grep -qF "${{ env.python-test-package }}" "all-deps.txt"; echo $? )

action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,17 @@ inputs:
7676
description: "Set desired python version with this keyword"
7777
required: false
7878
default: "3.8"
79+
use-external-python:
80+
description: "false (default): Install a new Python for this action; true: use the python installation in the previous steps"
81+
type: boolean
82+
required: false
83+
default: false
7984

8085
runs:
8186
using: "composite"
8287
steps:
8388
- name: Setup python
89+
if: ${{ ! inputs.use-external-python }}
8490
uses: actions/setup-python@v5
8591
with:
8692
python-version: ${{ inputs.python-version }}
@@ -93,13 +99,13 @@ runs:
9399
- name: Windows install dependencies
94100
if: ${{ runner.os == 'Windows' }}
95101
run: |
96-
pip install -r ${{ github.action_path }}\requirements.txt
102+
pip install -r ${{ github.action_path }}\requirements.txt --ignore-installed
97103
echo "path_sep=" >> $GITHUB_ENV
98104
shell: pwsh
99105

100106
- name: Posix install dependencies
101107
if: ${{ runner.os != 'Windows' }}
102-
run: pip install -r ${{ github.action_path }}/requirements.txt
108+
run: pip install -r ${{ github.action_path }}/requirements.txt --ignore-installed
103109
shell: bash
104110

105111
- name: Lint on Windows

0 commit comments

Comments
 (0)