Last active
August 29, 2024 09:10
-
-
Save blu3r4y/0e316bacca5a55f37acb3258a5465b1b to your computer and use it in GitHub Desktop.
GitHub action to activate a Poetry environment for subsequent steps
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
name: setup-poetry | |
on: | |
push: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Setup Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Install dependencies | |
run: poetry install | |
- name: Active environment | |
shell: bash | |
run: | | |
source $(poetry env info --path)/bin/activate | |
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH | |
echo "PYTHONHOME=" >> $GITHUB_ENV |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you so much for sharing those links with us. I appreciate you for helping me out and now it is my turn to repay you. And I would like to share the https://www.topessaywriting.org/samples/poetry website with you where you can read essay samples on various topics such as poetry and many more. If you are not good at writing essay assignments then you can visit the given link.