update to pyenv install #31
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: Python application | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install pyenv | |
run: | | |
curl https://pyenv.run | bash | |
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> $GITHUB_ENV | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> $GITHUB_ENV | |
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> $GITHUB_ENV | |
echo 'eval "$(pyenv init --path)"' >> $GITHUB_ENV | |
echo 'eval "$(pyenv init -)"' >> $GITHUB_ENV | |
- name: Set up Python ${{ matrix.python-version }} with pyenv | |
run: | | |
source $GITHUB_ENV | |
pyenv install ${{ matrix.python-version }} -s | |
pyenv virtualenv ${{ matrix.python-version }} venv | |
echo 'venv' >> .python-version | |
pyenv activate venv | |
- name: Install dependencies | |
run: | | |
source $GITHUB_ENV | |
pyenv activate venv | |
python -m pip install --upgrade pip | |
pip install pytest responses | |
pip install . | |
- name: Run tests | |
run: | | |
source $GITHUB_ENV | |
pyenv activate venv | |
JITO_TESTNET_URL=https://dallas.testnet.block-engine.jito.wtf/api/v1 pytest ./tests/test_jito_json_rpc_sdk.py |