From 3541876876398c3e4a670ca4ff03f9f14b0168e7 Mon Sep 17 00:00:00 2001 From: hemengyang Date: Wed, 25 May 2022 03:01:31 +0000 Subject: [PATCH 1/4] :construction_worker: uses setup-python built-in cache functionality --- .github/actions/setup-python/action.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/actions/setup-python/action.yml b/.github/actions/setup-python/action.yml index 42485fb7959..813ac2113b9 100644 --- a/.github/actions/setup-python/action.yml +++ b/.github/actions/setup-python/action.yml @@ -10,17 +10,14 @@ inputs: runs: using: "composite" steps: - - uses: actions/setup-python@v2 - with: - python-version: ${{ inputs.python-version }} - architecture: "x64" - - - uses: Gr1N/setup-poetry@v7 + - name: Install poetry + shell: bash + run: pipx install poetry - - uses: actions/cache@v2 + - uses: actions/setup-python@v3 with: - path: ~/.cache/pypoetry/virtualenvs - key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + python-version: ${{ inputs.python-version }} + cache: 'poetry' - run: poetry install -E all shell: bash From 2714715822c9e515df2d6aac1760e422e3e97150 Mon Sep 17 00:00:00 2001 From: hemengyang Date: Wed, 25 May 2022 03:19:05 +0000 Subject: [PATCH 2/4] :bug: try use correct python version --- .github/actions/setup-python/action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-python/action.yml b/.github/actions/setup-python/action.yml index 813ac2113b9..9dc2c3352bf 100644 --- a/.github/actions/setup-python/action.yml +++ b/.github/actions/setup-python/action.yml @@ -10,14 +10,15 @@ inputs: runs: using: "composite" steps: - - name: Install poetry - shell: bash - run: pipx install poetry - - uses: actions/setup-python@v3 with: python-version: ${{ inputs.python-version }} + architecture: "x64" cache: 'poetry' + - name: Install poetry + shell: bash + run: pipx install poetry + - run: poetry install -E all shell: bash From 8aea64eecd2eb472ea53c95f58ba35b353f970fc Mon Sep 17 00:00:00 2001 From: hemengyang Date: Wed, 25 May 2022 06:55:33 +0000 Subject: [PATCH 3/4] :bug: try try try --- .github/actions/setup-python/action.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-python/action.yml b/.github/actions/setup-python/action.yml index 9dc2c3352bf..2683b47d9b5 100644 --- a/.github/actions/setup-python/action.yml +++ b/.github/actions/setup-python/action.yml @@ -10,15 +10,17 @@ inputs: runs: using: "composite" steps: + - name: Install poetry + shell: bash + run: pipx install poetry + - uses: actions/setup-python@v3 with: python-version: ${{ inputs.python-version }} architecture: "x64" cache: 'poetry' - - name: Install poetry - shell: bash - run: pipx install poetry - - - run: poetry install -E all + - run: | + poetry env use ${{ inputs.python-version }} + poetry install -E all shell: bash From ab877666b843e00dd59e0ccb01f304f4e57d61e9 Mon Sep 17 00:00:00 2001 From: hemengyang Date: Thu, 26 May 2022 00:04:07 +0000 Subject: [PATCH 4/4] :bug: another try --- .github/actions/setup-python/action.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-python/action.yml b/.github/actions/setup-python/action.yml index 2683b47d9b5..37950c814b4 100644 --- a/.github/actions/setup-python/action.yml +++ b/.github/actions/setup-python/action.yml @@ -12,7 +12,11 @@ runs: steps: - name: Install poetry shell: bash - run: pipx install poetry + run: pipx install poetry --pip-args=--pre + + - name: Config poetry + shell: bash + run: poetry config virtualenvs.prefer-active-python true - uses: actions/setup-python@v3 with: @@ -20,7 +24,5 @@ runs: architecture: "x64" cache: 'poetry' - - run: | - poetry env use ${{ inputs.python-version }} - poetry install -E all + - run: poetry install -E all shell: bash