diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6925f08..00d88fee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,61 +71,15 @@ jobs: with: python-version: ${{ env.PYTHON_VERSION }} - - name: Cache Poetry Install - id: cache-poetry - uses: actions/cache@v4 - with: - path: | - ~/.cache/pypoetry - .venv - ${{ 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') - }} - - - name: Install Poetry on macOS - if: steps.cache-poetry.outputs.cache-hit != 'true' && runner.os == 'macOS' - run: | - export POETRY_HOME=$HOME/.poetry - python3 -m venv $POETRY_HOME - $POETRY_HOME/bin/pip install poetry==1.8.2 - $POETRY_HOME/bin/poetry --version - shell: bash - - - name: Install Poetry on Linux/macOS - if: steps.cache-poetry.outputs.cache-hit != 'true' && runner.os == 'Linux' - run: | - if [ $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 - $POETRY_HOME/bin/pip install poetry==1.8.2 - $POETRY_HOME/bin/poetry --version - fi - - - name: Install Poetry on Windows - if: steps.cache-poetry.outputs.cache-hit != 'true' && runner.os == 'Windows' - shell: pwsh - run: | - curl -sSL https://install.python-poetry.org | python - - - - name: Add Poetry to PATH - if: runner.os == 'Linux' || runner.os == 'macOS' + - name: Install pipx run: | - if [ $RUNNER_OS = 'Linux' ]; then - echo "/opt/poetry/bin" >> $GITHUB_PATH - elif [ $RUNNER_OS = 'macOS' ]; then - echo "$HOME/.poetry/bin" >> $GITHUB_PATH - fi + python3 -m pip install --upgrade pip + python3 -m pip install pipx + python3 -m pipx ensurepath - - name: Add Poetry to PATH - if: runner.os == 'Windows' + - name: Install Poetry run: | - echo "C:\\opt\\poetry\\Scripts" >> $GITHUB_PATH - echo "$env:USERPROFILE\\.poetry\\bin" >> $env:GITHUB_PATH + pipx install poetry - name: Install Package run: poetry install --no-interaction --no-ansi