ci: pipx install poetry, and use setup-python cache support for poetry
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 801ecc96b2..14435098a8 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -19,27 +19,14 @@ jobs:
     steps:
       - uses: actions/checkout@v3
 
-      - uses: actions/setup-python@v4
-        with:
-          python-version: "3.10"
-
-      # Install Poetry
       - name: Install Poetry
         run: |
-          curl -sSL https://install.python-poetry.org | python3 -
+          pipx install poetry
 
-      # Add Poetry to PATH
-      - name: Add Poetry to PATH
-        run: echo "$HOME/.local/bin" >> $GITHUB_PATH
-
-      # Cache Poetry's dependencies based on the lock file
-      - name: Set up Poetry cache
-        uses: actions/cache@v3
+      - uses: actions/setup-python@v4
         with:
-          path: ~/.cache/pypoetry
-          key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
-          restore-keys: |
-            ${{ runner.os }}-poetry-
+          python-version: "3.10"
+          cache: 'poetry'
 
       # Install dependencies using Poetry
       - name: Install dependencies

As per my comments in #886 