Skip to content

Commit

Permalink
ci(rebase): add macos
Browse files Browse the repository at this point in the history
  • Loading branch information
mariugul committed Sep 3, 2024
1 parent cc0d46a commit d87eabc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
path: |
~/.cache/pypoetry
.venv
${{ runner.os == 'windows-latest' && 'C:\\opt\\poetry' || '/opt/poetry' }}
${{ runner.os == 'windows-latest' && 'C:\\opt\\poetry' || (runner.os == 'macos-latest' && '$HOME/.poetry') || '/opt/poetry' }}
key: ${{ matrix.os }}-poetry-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('**/pyproject.toml')
}}

Expand All @@ -89,6 +89,11 @@ jobs:
python -m venv %POETRY_HOME%
%POETRY_HOME%\Scripts\pip install poetry==1.8.2
%POETRY_HOME%\Scripts\poetry --version
elif [ $RUNNER_OS = 'macOS' ]; then
export POETRY_HOME=$HOME/.poetry
python3 -m venv $POETRY_HOME
$POETRY_HOME/bin/pip install poetry==1.8.2
$POETRY_HOME/bin/poetry --version
else
export POETRY_HOME=/opt/poetry
python3 -m venv $POETRY_HOME
Expand All @@ -100,6 +105,8 @@ jobs:
run: |
if [ $RUNNER_OS = 'Windows' ]; then
echo "C:\\opt\\poetry\\Scripts" >> $GITHUB_PATH
elif [ $RUNNER_OS = 'macOS' ]; then
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
else
echo "/opt/poetry/bin" >> $GITHUB_PATH
fi
Expand Down

0 comments on commit d87eabc

Please sign in to comment.