77jobs :
88 unit-tests :
99 name : Test on Python v${{ matrix.python-version }}
10- runs-on : ubuntu-20 .04
10+ runs-on : ubuntu-22 .04
1111 strategy :
1212 matrix :
1313 include :
1414 - pipenv-version : ' 2022.4.8'
1515 python-version : ' 3.6'
16+ install-with : pyenv
1617 - pipenv-version : ' 2022.4.8'
1718 python-version : ' 3.7'
19+ install-with : pyenv
1820 - pipenv-version : ' 2022.4.8'
1921 python-version : ' 3.8'
2022 - pipenv-version : ' 2022.4.8'
@@ -30,15 +32,27 @@ jobs:
3032
3133 steps :
3234 - name : Checkout the repository
33- uses : actions/checkout@v2
35+ uses : actions/checkout@v4
3436 with :
3537 persist-credentials : false
3638
3739 - name : Install build essentials
3840 run : sudo apt-get --yes install build-essential
3941
40- - name : Set up Python
41- uses : actions/setup-python@v2
42+ - name : Install Python via pyenv
43+ if : matrix.install-with == 'pyenv'
44+ run : |
45+ export PYENV_GIT_TAG="v2.6.11"
46+ curl https://pyenv.run | bash
47+ export PATH="$HOME/.pyenv/bin:$PATH"
48+ eval "$(pyenv init -)"
49+ pyenv install ${{ matrix.python-version }}
50+ pyenv global ${{ matrix.python-version }}
51+ echo "$HOME/.pyenv/shims" >> $GITHUB_PATH
52+
53+ - name : Install Python via actions/setup-python
54+ if : matrix.install-with == null || matrix.install-with == 'actions/setup'
55+ uses : actions/setup-python@v6
4256 with :
4357 python-version : ${{ matrix.python-version }}
4458
@@ -57,15 +71,27 @@ jobs:
5771
5872 steps :
5973 - name : Checkout the repository
60- uses : actions/checkout@v2
74+ uses : actions/checkout@v4
6175 with :
6276 persist-credentials : false
6377
6478 - name : Install build essentials
6579 run : sudo apt-get --yes install build-essential
6680
67- - name : Set up Python
68- uses : actions/setup-python@v2
81+ - name : Install Python via pyenv
82+ if : matrix.install-with == 'pyenv'
83+ run : |
84+ export PYENV_GIT_TAG="v2.6.11"
85+ curl https://pyenv.run | bash
86+ export PATH="$HOME/.pyenv/bin:$PATH"
87+ eval "$(pyenv init -)"
88+ pyenv install ${{ matrix.python-version }}
89+ pyenv global ${{ matrix.python-version }}
90+ echo "$HOME/.pyenv/shims" >> $GITHUB_PATH
91+
92+ - name : Install Python via actions/setup-python
93+ if : matrix.install-with == null || matrix.install-with == 'actions/setup'
94+ uses : actions/setup-python@v6
6995
7096 - name : Install dependencies
7197 run : |
@@ -82,15 +108,27 @@ jobs:
82108
83109 steps :
84110 - name : Checkout the repository
85- uses : actions/checkout@v2
111+ uses : actions/checkout@v4
86112 with :
87113 persist-credentials : false
88114
89115 - name : Install build essentials
90116 run : sudo apt-get --yes install build-essential
91117
92- - name : Set up Python
93- uses : actions/setup-python@v2
118+ - name : Install Python via pyenv
119+ if : matrix.install-with == 'pyenv'
120+ run : |
121+ export PYENV_GIT_TAG="v2.6.11"
122+ curl https://pyenv.run | bash
123+ export PATH="$HOME/.pyenv/bin:$PATH"
124+ eval "$(pyenv init -)"
125+ pyenv install ${{ matrix.python-version }}
126+ pyenv global ${{ matrix.python-version }}
127+ echo "$HOME/.pyenv/shims" >> $GITHUB_PATH
128+
129+ - name : Install Python via actions/setup-python
130+ if : matrix.install-with == null || matrix.install-with == 'actions/setup'
131+ uses : actions/setup-python@v6
94132
95133 - name : Install dependencies
96134 run : |
@@ -115,15 +153,27 @@ jobs:
115153
116154 steps :
117155 - name : Checkout the repository
118- uses : actions/checkout@v2
156+ uses : actions/checkout@v4
119157 with :
120158 persist-credentials : false
121159
122160 - name : Install build essentials
123161 run : sudo apt-get --yes install build-essential
124162
125- - name : Set up Python
126- uses : actions/setup-python@v2
163+ - name : Install Python via pyenv
164+ if : matrix.install-with == 'pyenv'
165+ run : |
166+ export PYENV_GIT_TAG="v2.6.11"
167+ curl https://pyenv.run | bash
168+ export PATH="$HOME/.pyenv/bin:$PATH"
169+ eval "$(pyenv init -)"
170+ pyenv install ${{ matrix.python-version }}
171+ pyenv global ${{ matrix.python-version }}
172+ echo "$HOME/.pyenv/shims" >> $GITHUB_PATH
173+
174+ - name : Install Python via actions/setup-python
175+ if : matrix.install-with == null || matrix.install-with == 'actions/setup'
176+ uses : actions/setup-python@v6
127177
128178 - name : Install dependencies
129179 run : |
0 commit comments