From 238510dcadfc722c1c3ac3e0670d26d6d1b7e116 Mon Sep 17 00:00:00 2001 From: Malachi Soord Date: Fri, 7 Jun 2024 22:49:19 +0200 Subject: [PATCH 1/2] Extract from .tool-versions in CI --- .github/workflows/ci.yml | 14 +++++++++++--- .github/workflows/publish.yml | 8 ++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85ac624..e705ac4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,13 +19,17 @@ jobs: key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} restore-keys: | ${{ runner.os }}-poetry- + - name: Parse .tool-versions + uses: wistia/parse-tool-versions@v2.0.0 + with: + prefix: 'tool_version_' - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: ${{ env.TOOL_VERSION_PYTHON }} - name: Install poetry uses: abatilo/actions-poetry@v3.0.0 with: - poetry-version: '1.6.1' + poetry-version: ${{ env.TOOL_VERSION_POETRY }} - name: Install pip dependencies run: poetry install - uses: pre-commit/action@v3.0.1 @@ -42,13 +46,17 @@ jobs: key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('poetry.lock') }} restore-keys: | ${{ runner.os }}-poetry- + - name: Parse .tool-versions + uses: wistia/parse-tool-versions@v2.0.0 + with: + prefix: 'tool_version_' - uses: actions/setup-python@v5 with: python-version: '${{ matrix.python-version }}' - name: Install poetry uses: abatilo/actions-poetry@v3.0.0 with: - poetry-version: '1.6.1' + poetry-version: ${{ env.TOOL_VERSION_POETRY }} - name: Install pip dependencies run: poetry install - name: Run tests diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 60b9b03..e2caac8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,13 +14,17 @@ jobs: id-token: write steps: - uses: actions/checkout@master + - name: Parse .tool-versions + uses: wistia/parse-tool-versions@v2.0.0 + with: + prefix: 'tool_version_' - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: ${{ env.TOOL_VERSION_PYTHON }} - name: Install poetry uses: abatilo/actions-poetry@v3.0.0 with: - poetry-version: '1.6.1' + poetry-version: ${{ env.TOOL_VERSION_POETRY }} - name: Install pip dependencies run: poetry install - name: Package From 3ba61c61635c2e038c71842e1472354780d57fec Mon Sep 17 00:00:00 2001 From: Malachi Soord Date: Fri, 7 Jun 2024 22:53:39 +0200 Subject: [PATCH 2/2] Update --- .github/workflows/ci.yml | 16 +++++++--------- .github/workflows/publish.yml | 9 ++++----- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e705ac4..04998e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,16 +20,15 @@ jobs: restore-keys: | ${{ runner.os }}-poetry- - name: Parse .tool-versions - uses: wistia/parse-tool-versions@v2.0.0 - with: - prefix: 'tool_version_' + uses: paulo-ferraz-oliveira/parse-tool-versions@v1 + id: tool-versions - uses: actions/setup-python@v5 with: - python-version: ${{ env.TOOL_VERSION_PYTHON }} + python-version: ${{ steps.tool-versions.outputs.python }} - name: Install poetry uses: abatilo/actions-poetry@v3.0.0 with: - poetry-version: ${{ env.TOOL_VERSION_POETRY }} + poetry-version: ${{ steps.tool-versions.outputs.poetry }} - name: Install pip dependencies run: poetry install - uses: pre-commit/action@v3.0.1 @@ -47,16 +46,15 @@ jobs: restore-keys: | ${{ runner.os }}-poetry- - name: Parse .tool-versions - uses: wistia/parse-tool-versions@v2.0.0 - with: - prefix: 'tool_version_' + uses: paulo-ferraz-oliveira/parse-tool-versions@v1 + id: tool-versions - uses: actions/setup-python@v5 with: python-version: '${{ matrix.python-version }}' - name: Install poetry uses: abatilo/actions-poetry@v3.0.0 with: - poetry-version: ${{ env.TOOL_VERSION_POETRY }} + poetry-version: ${{ steps.tool-versions.outputs.poetry }} - name: Install pip dependencies run: poetry install - name: Run tests diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e2caac8..9208b99 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,16 +15,15 @@ jobs: steps: - uses: actions/checkout@master - name: Parse .tool-versions - uses: wistia/parse-tool-versions@v2.0.0 - with: - prefix: 'tool_version_' + uses: paulo-ferraz-oliveira/parse-tool-versions@v1 + id: tool-versions - uses: actions/setup-python@v5 with: - python-version: ${{ env.TOOL_VERSION_PYTHON }} + python-version: ${{ steps.tool-versions.outputs.python }} - name: Install poetry uses: abatilo/actions-poetry@v3.0.0 with: - poetry-version: ${{ env.TOOL_VERSION_POETRY }} + poetry-version: ${{ steps.tool-versions.outputs.poetry }} - name: Install pip dependencies run: poetry install - name: Package