Skip to content

Commit

Permalink
ci(actions): setup python prior to poetry install.
Browse files Browse the repository at this point in the history
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
  • Loading branch information
BradenM committed Mar 19, 2023
1 parent e12c1f9 commit a8af251
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/actions/setup-micropy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ runs:
mkdir -p "${{ inputs.poetry-home }}"
curl -sSL -o ${{ inputs.poetry-home }}/install-poetry.py ${{ inputs.poetry-install-url }}
- name: Install Poetry
shell: bash
run: |
python3 ${{ inputs.poetry-home }}/install-poetry.py --version ${{ inputs.poetry-version }}
${{ inputs.poetry-home }}/bin/poetry --version
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
id: python-setup
with:
python-version: ${{ inputs.python-version }}

- name: Install Poetry
shell: bash
run: |
python ${{ inputs.poetry-home }}/install-poetry.py --version ${{ inputs.poetry-version }}
${{ inputs.poetry-home }}/bin/poetry --version
- name: Get poetry cache dir.
id: poetry-config
shell: bash
Expand All @@ -94,16 +94,16 @@ runs:
uses: actions/cache@v3
with:
path: ${{ steps.poetry-config.outputs.cache-dir }}
key: poetry-cache-dir-${{ inputs.runner || matrix.os || runner.os }}-${{ inputs.python-version }}-${{ inputs.poetry-version }}
key: poetry-cache-${{ inputs.runner || matrix.os || runner.os }}-${{ inputs.python-version }}-${{ inputs.poetry-version }}

- name: Cache virtual env.
uses: actions/cache@v3
id: venv-cache
with:
path: ./.venv
key: poetry-venv-dir-${{ inputs.runner || matrix.os || runner.os }}-${{ inputs.python-version }}-${{ inputs.poetry-version }}-${{ hashFiles('poetry.lock') }}
path: .venv
key: poetry-venv-${{ inputs.runner || matrix.os || runner.os }}-${{ inputs.python-version }}-${{ inputs.poetry-version }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
poetry-venv-dir-${{ inputs.runner || matrix.os || runner.os }}-${{ inputs.python-version }}-${{ inputs.poetry-version }}-
poetry-venv-${{ inputs.runner || matrix.os || runner.os }}-${{ inputs.python-version }}-${{ inputs.poetry-version }}-
- name: Use venv.
shell: bash
Expand Down

0 comments on commit a8af251

Please sign in to comment.