-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: see if python 3.7 can work with new poetry
- Loading branch information
Showing
1 changed file
with
20 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |