-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (49 loc) · 1.64 KB
/
python-app.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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']
env:
PYENV_ROOT: $HOME/.pyenv
PATH: $HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install pyenv
run: |
curl https://pyenv.run | bash
echo 'eval "$(pyenv init --path)"' >> $GITHUB_ENV
echo 'eval "$(pyenv init -)"' >> $GITHUB_ENV
echo 'eval "$(pyenv virtualenv-init -)"' >> $GITHUB_ENV
- name: Set up Python ${{ matrix.python-version }} with pyenv
shell: bash -l {0}
run: |
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv install ${{ matrix.python-version }} -s
pyenv virtualenv ${{ matrix.python-version }} venv
echo "venv" > .python-version
pyenv activate venv
echo "PYENV_VERSION=venv" >> $GITHUB_ENV
- name: Install dependencies
shell: bash -l {0}
run: |
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv activate venv
python -m pip install --upgrade pip
pip install pytest responses
pip install .
- name: Run tests
shell: bash -l {0}
run: |
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv activate venv
JITO_TESTNET_URL=https://dallas.testnet.block-engine.jito.wtf/api/v1 pytest ./tests/test_jito_json_rpc_sdk.py