Skip to content

Commit

Permalink
Fix case, don't depend on virtualenv installation
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Oct 2, 2023
1 parent deab224 commit e1c6fdb
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions composite/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,11 @@ runs:
key: enricomi-publish-action-${{ runner.os }}-${{ runner.arch }}-pip-${{ steps.python.outputs.version }}-6ca4d32816ff499719c9ab474caf6c68

- name: Create virtualenv
id: venv
continue-on-error: true
run: |
echo '##[group]Create virtualenv'
# make sure wheel is installed, which improves installing our dependencies
# install virtualenv, if it is not yet installed
python3 -m pip install virtualenv
python3 -m virtualenv venv
echo '##[endgroup]'
Expand All @@ -210,16 +212,16 @@ runs:
- name: Install Python dependencies
run: |
echo '##[group]Install Python dependencies'
# activate virtualenv
case "$RUNNER_OS" in
Linux*)
macOS*)
source venv/bin/activate
;;
Windows*)
venv\Scripts\activate
;;
esac
if [ "${{ steps.venv.outcome }} == "success" ]
then
# activate virtualenv
case "$RUNNER_OS" in
Linux*|macOS*)
source venv/bin/activate;;
Windows*)
venv\Scripts\activate;;
esac
fi
# make sure wheel is installed, which improves installing our dependencies
python3 -m pip install wheel
Expand Down

0 comments on commit e1c6fdb

Please sign in to comment.