Skip to content

Commit 2ab9820

Browse files
committed
use a var
1 parent 2de476d commit 2ab9820

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/PR.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,16 @@ jobs:
6262
- name: Install package into separate venv
6363
shell: bash
6464
run: |
65-
python3 -m venv test_venv
66-
find -type f test_venv
67-
source test_venv/bin/activate || call test_venv\Scripts\activate
68-
pip install .
65+
venv_dir="$RUNNER_TEMP/dog_food_venv"
66+
python3 -m venv "${venv_dir}"
67+
if [[ "$RUNNER_OS" == "Windows" ]]; then
68+
binary_folder_name="Scripts"
69+
else
70+
binary_folder_name="bin"
71+
fi
72+
echo "DOG_FOOD_VENV_BIN=${venv_dir}/${binary_folder_name}" >> "$GITHUB_ENV"
73+
${DOG_FOOD_VENV_BIN}/pip install .
6974
- name: Lint our own pakage
7075
shell: bash
7176
run: |
72-
source test_venv/bin/activate || call test_venv\Scripts\activate
73-
nps lint .
77+
${DOG_FOOD_VENV_BIN}/nps lint .

0 commit comments

Comments
 (0)