Skip to content

Commit

Permalink
Extract from .tool-versions in CI (#122)
Browse files Browse the repository at this point in the history
* Extract from .tool-versions in CI

* Update
  • Loading branch information
inverse authored Jun 7, 2024
1 parent 2404868 commit 9bd6624
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
poetry-version: '1.6.1'
poetry-version: ${{ steps.tool-versions.outputs.poetry }}
- name: Install pip dependencies
run: poetry install
- uses: pre-commit/[email protected]
Expand All @@ -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/[email protected]
with:
poetry-version: '1.6.1'
poetry-version: ${{ steps.tool-versions.outputs.poetry }}
- name: Install pip dependencies
run: poetry install
- name: Run tests
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
poetry-version: '1.6.1'
poetry-version: ${{ steps.tool-versions.outputs.poetry }}
- name: Install pip dependencies
run: poetry install
- name: Package
Expand Down

0 comments on commit 9bd6624

Please sign in to comment.