Skip to content

Commit

Permalink
ci: Pin the version and cache poetry
Browse files Browse the repository at this point in the history
Resolves #41
  • Loading branch information
YDX-2147483647 committed Aug 11, 2023
1 parent 09f3b44 commit fb6127a
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,21 @@ jobs:
- uses: actions/checkout@v3

# Setup python tools
- name: Get pipx environment
id: pipx-env
run: |
echo "VERSION=$(pipx --version)" >> $GITHUB_OUTPUT
echo "HOME=$(pipx environment -v PIPX_HOME)" >> $GITHUB_OUTPUT
echo "LOCAL_VENVS=$(pipx environment -v PIPX_LOCAL_VENVS)" >> $GITHUB_OUTPUT
- name: Cache poetry
uses: actions/cache@v3
with:
key: ${{ runner.os }}-pipx@${{ steps.pipx-env.outputs.VERSION }}[email protected]
path: |
${{ steps.pipx-env.outputs.HOME }}/poetry/
${{ steps.pipx-env.outputs.LOCAL_VENVS }}/poetry
- name: Install poetry
run: pipx install poetry
run: pipx install poetry==1.5.1
- name: Configure poetry for in-project venv
run: |
poetry config virtualenvs.in-project true
Expand Down Expand Up @@ -72,8 +85,21 @@ jobs:
- uses: actions/checkout@v3

# Setup python tools
- name: Get pipx environment
id: pipx-env
run: |
echo "VERSION=$(pipx --version)" >> $GITHUB_OUTPUT
echo "HOME=$(pipx environment -v PIPX_HOME)" >> $GITHUB_OUTPUT
echo "LOCAL_VENVS=$(pipx environment -v PIPX_LOCAL_VENVS)" >> $GITHUB_OUTPUT
- name: Cache poetry
uses: actions/cache@v3
with:
key: ${{ runner.os }}-pipx@${{ steps.pipx-env.outputs.VERSION }}[email protected]
path: |
${{ steps.pipx-env.outputs.HOME }}/poetry/
${{ steps.pipx-env.outputs.LOCAL_VENVS }}/poetry
- name: Install poetry
run: pipx install poetry
run: pipx install poetry==1.5.1
- name: Configure poetry for in-project venv
run: |
poetry config virtualenvs.in-project true
Expand Down

0 comments on commit fb6127a

Please sign in to comment.