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