mirror of https://github.com/theacodes/nox.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
4.2 KiB
104 lines
4.2 KiB
name: Setup Nox |
|
description: "Prepares all python versions for nox" |
|
inputs: |
|
python-versions: |
|
description: "comma-separated list of python versions to install" |
|
required: false |
|
default: "3.7, 3.8, 3.9, 3.10, pypy-3.7, pypy-3.8, pypy-3.9" |
|
branding: |
|
icon: package |
|
color: blue |
|
|
|
runs: |
|
using: composite |
|
steps: |
|
- name: "Validate input" |
|
id: helper |
|
run: ${{ runner.os == 'Windows' && 'python' || 'python3' }} '${{ github.action_path }}/.github/action_helper.py' '${{ inputs.python-versions }}' |
|
shell: bash |
|
|
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_0 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 0 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_1 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 1 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_2 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 2 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_3 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 3 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_4 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 4 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_5 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 5 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_6 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 6 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_7 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 7 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_8 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 8 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_9 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 9 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_10 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 10 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_11 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 11 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_12 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 12 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_13 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 13 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_14 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 14 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_15 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 15 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_16 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 16 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_17 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 17 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_18 }}" |
|
if: ${{ steps.helper.outputs.interpreter_count > 18 }} |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: "${{ steps.helper.outputs.interpreter_19 }}" |
|
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 }}' |
|
shell: bash
|
|
|