Skip to content

Commit

Permalink
fix: use setup-python v4.1's environmentless setup (#629)
Browse files Browse the repository at this point in the history
* fix: use setup-python v4.1's environmentless setup

This removes the dependence on the final output being reasonable to run nox. Targeting only <3.7 is valid now.

* fix: mistake in YAML syntax

* Update action.yml

* Update action.yml

* fix: use newly moved tag v4.1

* Update action.yml
  • Loading branch information
henryiii committed Jul 13, 2022
1 parent 1bd7f96 commit f630e2d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@ branding:
runs:
using: composite
steps:
- uses: actions/setup-python@v4
id: localpython
with:
python-version: "3.7 - 3.10"
activate-environment: false

- name: "Validate input"
id: helper
run: ${{ runner.os == 'Windows' && 'python' || 'python3' }} '${{ github.action_path }}/.github/action_helper.py' '${{ inputs.python-versions }}'
run: >
'${{ steps.localpython.outputs.python-path }}' '${{ github.action_path }}/.github/action_helper.py' '${{ inputs.python-versions }}'
shell: bash

- uses: actions/setup-python@v4
Expand Down Expand Up @@ -99,6 +106,5 @@ runs:
if: ${{ steps.helper.outputs.interpreter_count > 19 }}

- name: "Install nox"
# --python "$(which python)" => always use the last setup-python version to install nox.
run: pipx install --python "$(which python)" '${{ github.action_path }}'
run: pipx install --python "${{ steps.localpython.outputs.python-path }}" '${{ github.action_path }}'
shell: bash

0 comments on commit f630e2d

Please sign in to comment.