Skip to content

Commit

Permalink
wip: see if python 3.7 can work with new poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
mcous committed Nov 3, 2023
1 parent 08acfc8 commit 6fb98ff
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,55 @@
name: "Set up repository for CI"
description: "Install development dependencies"
name: 'Set up repository for CI'
description: 'Install development dependencies'

inputs:
python-version:
description: "Python version to install"
default: "3.12"
description: 'Python version to install'
default: '3.12'
poetry-version:
description: "Poetry version to install"
default: "1.6.1"
description: 'Poetry version to install'
default: '1.6.1'
cache:
description: "Cache directory"
default: "${{ runner.temp }}/cache"
description: 'Cache directory'
default: '${{ runner.temp }}/cache'

runs:
using: "composite"
using: 'composite'
steps:
- name: "Set up Python"
- name: 'Set up Python'
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
python-version: |
${{ inputs.python-version }}
3.12
- name: "Set up dependency cache"
- name: 'Set up dependency cache'
uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ inputs.poetry-version }}-${{ hashFiles('poetry.lock') }}
key: ${{ runner.os }}-${{ inputs.python-version }}-${{ inputs.poetry-version }}-${{ hashFiles('poetry.lock') }}
path: ${{ inputs.cache }}

- name: "Set up PATH on POSIX"
- name: 'Set up PATH on POSIX'
if: ${{ runner.os != 'windows'}}
shell: bash
run: echo "${{ inputs.cache }}/tools/bin" >> $GITHUB_PATH

- name: "Set up PATH on Windows"
- name: 'Set up PATH on Windows'
if: ${{ runner.os == 'windows'}}
shell: bash
run: echo "${{ inputs.cache }}/tools/Scripts" >> $GITHUB_PATH

- name: "Install Poetry"
- name: 'Install Poetry'
shell: bash
run: |
if ! poetry --version; then
"${{ steps.setup-python.outputs.python-path }}" -m venv "${{ inputs.cache }}/tools"
pip install poetry==${{ inputs.poetry-version }}
fi
- name: "Install development dependencies"
- name: 'Install development dependencies'
shell: bash
run: |
poetry config cache-dir "${{ inputs.cache }}/poetry"
poetry env use ${{ inputs.python-version }}
poetry install --sync

0 comments on commit 6fb98ff

Please sign in to comment.