From 9bd66247abde25351f8a88e0523ec7c26479aca5 Mon Sep 17 00:00:00 2001 From: Malachi Soord Date: Fri, 7 Jun 2024 22:54:42 +0200 Subject: [PATCH] Extract from .tool-versions in CI (#122) * Extract from .tool-versions in CI * Update --- .github/workflows/ci.yml | 12 +++++++++--- .github/workflows/publish.yml | 7 +++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85ac624..04998e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,13 +19,16 @@ jobs: key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} restore-keys: | ${{ runner.os }}-poetry- + - name: Parse .tool-versions + uses: paulo-ferraz-oliveira/parse-tool-versions@v1 + id: tool-versions - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: ${{ steps.tool-versions.outputs.python }} - name: Install poetry uses: abatilo/actions-poetry@v3.0.0 with: - poetry-version: '1.6.1' + poetry-version: ${{ steps.tool-versions.outputs.poetry }} - name: Install pip dependencies run: poetry install - uses: pre-commit/action@v3.0.1 @@ -42,13 +45,16 @@ jobs: key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('poetry.lock') }} restore-keys: | ${{ runner.os }}-poetry- + - name: Parse .tool-versions + 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: '1.6.1' + 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 60b9b03..9208b99 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,13 +14,16 @@ jobs: id-token: write steps: - uses: actions/checkout@master + - name: Parse .tool-versions + uses: paulo-ferraz-oliveira/parse-tool-versions@v1 + id: tool-versions - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: ${{ steps.tool-versions.outputs.python }} - name: Install poetry uses: abatilo/actions-poetry@v3.0.0 with: - poetry-version: '1.6.1' + poetry-version: ${{ steps.tool-versions.outputs.poetry }} - name: Install pip dependencies run: poetry install - name: Package