77 branches : [ main ]
88
99env :
10- python_cache_macOS_path : |
11- ~/Library/Caches/pip
12- python_cache_windows_path : |
13- ~\AppData\Local\pip\Cache
14- python_cache_ubuntu_path : |
15- ~/.cache/pip
10+ python_cache_macOS_path : ~/Library/Caches/pip
11+ python_cache_windows_path : ~\AppData\Local\pip\Cache
12+ python_cache_ubuntu_path : ~/.cache/pip
13+ pipenv_version : 2021.11.9 # FIXME upgrade pipenv when https://github.com/pypa/pipenv/issues/4430 is actually fixed
14+
1615jobs :
1716 # Check that a news file has been added to this branch when a PR is created
1817 assert-news :
@@ -57,10 +56,12 @@ jobs:
5756 # normal dependencies from setup.py).
5857 # This code also forces the system to install latest tools as the ones present on the CI system may be too old
5958 # for the process to go through properly.
59+ # FIXME upgrade pipenv when https://github.com/pypa/pipenv/issues/4430 is actually fixed
6060 run : |
6161 python -m pip install --upgrade pip wheel setuptools
62- python -m pip install flake8 pipenv pytest
63- python -m pipenv lock --dev -r --pre > dev-requirements.txt
62+ python -m pip install pipenv==${{ env.pipenv_version }}
63+ echo "Locking dependencies"
64+ python -m pipenv lock --dev -r > dev-requirements.txt
6465 - uses : FranzDiebold/github-env-vars-action@v2
6566 - name : Load Python Dependencies from cache
6667 uses : actions/cache@v2
@@ -94,10 +95,12 @@ jobs:
9495 # normal dependencies from setup.py).
9596 # This code also forces the system to install latest tools as the ones present on the CI system may be too old
9697 # for the process to go through properly.
98+ # FIXME upgrade when https://github.com/pypa/pipenv/issues/4430 is actually fixed
9799 run : |
98100 python -m pip install --upgrade pip wheel setuptools
99- python -m pip install flake8 pipenv pytest
100- python -m pipenv lock --dev -r --pre > dev-requirements.txt
101+ python -m pip install pipenv==${{ env.pipenv_version }}
102+ echo "Locking dependencies"
103+ python -m pipenv lock --dev -r > dev-requirements.txt
101104 - uses : FranzDiebold/github-env-vars-action@v2
102105 - name : Load Python Dependencies from cache
103106 uses : actions/cache@v2
@@ -150,28 +153,30 @@ jobs:
150153 strategy :
151154 fail-fast : false
152155 matrix :
153- os : [ubuntu-latest, macOS-latest, windows-latest]
156+ os : [ubuntu-latest ] # FIXME add other platforms when much quicker macOS-latest, windows-latest]
154157 python-version : ["3.7", "3.8", "3.9", "3.10"]
155158 multi-platform :
156159 - ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }}
157- # include:
158- # - os: windows-latest
159- # cache_path: ${{ env.python_cache_windows_path }}
160- # - os: macOS-latest
161- # cache_path: ${{ env.python_cache_macOS_path }}
162- # - os: ubuntu-latest
163- # cache_path: ${{ env.python_cache_ubuntu_path }}
164- exclude :
160+ # include:
161+ # - os: windows-latest
162+ # cache_path: ${{ env.python_cache_windows_path }}
163+ # - os: macOS-latest
164+ # cache_path: ${{ env.python_cache_macOS_path }}
165+ # - os: ubuntu-latest
166+ # cache_path: ${{ env.python_cache_ubuntu_path }}
167+ # FIXME run on every platform as on Linux when speed is equivalent
168+ include :
165169 - os : macOS-latest
166170 multi-platform : false
167- - os : macOS-latest
168- python-version : 3.10
169- - os : macOS-latest
170- python-version : 3.8
171- - os : macOS-latest
172- python-version : 3.7
171+ python-version : 3.9
173172 - os : windows-latest
174173 multi-platform : false
174+ python-version : 3.8
175+ # exclude:
176+ # - os: macOS-latest
177+ # multi-platform: false
178+ # - os: windows-latest
179+ # multi-platform: false
175180
176181 name : Build and test
177182 runs-on : ${{ matrix.os }}
@@ -181,31 +186,43 @@ jobs:
181186 uses : actions/setup-python@v2
182187 with :
183188 python-version : ${{ matrix.python-version }}
189+ - name : Install python tools
190+ # This code forces the system to install latest tools as the ones present on the CI system may be too old
191+ # for the process to go through properly.
192+ run : |
193+ python -m pip install --upgrade pip wheel setuptools
194+ python -m pip install --upgrade flake8 pytest
195+ - if : ${{ startsWith(matrix.os, 'windows') }}
196+ run : python -m pip install pipenv
197+ name : Install latest pipenv [${{ env.pipenv_version }}]
198+ - if : ${{ !startsWith(matrix.os, 'windows') }}
199+ run : python -m pip install pipenv==${{ env.pipenv_version }}
200+ name : Install a fixed version of pipenv [${{ env.pipenv_version }}]
184201 - name : Determine dependencies [OS:${{ matrix.os }}, Python:${{ matrix.python-version }}]
185202 # Note
186203 # The below code generates a pip requirements file from the pipenv development requirements (also obtaining the
187204 # normal dependencies from setup.py).
188- # This code also forces the system to install latest tools as the ones present on the CI system may be too old
189- # for the process to go through properly.
190205 run : |
191- python -m pip install --upgrade pip wheel setuptools
192- python -m pip install flake8 pipenv pytest
193- python -m pipenv lock --dev -r --pre > dev-requirements.txt
206+ python -m pipenv lock --dev -r > dev-requirements.txt
194207 - if : ${{ startsWith(matrix.os, 'macOS') }}
195208 run : echo "CACHE_PATH=${{ env.python_cache_macOS_path }}" >> $GITHUB_ENV
196209 - if : ${{ startsWith(matrix.os, 'windows') }}
197210 run : echo "CACHE_PATH=${{ env.python_cache_windows_path }}" >> $GITHUB_ENV
198211 - if : ${{ startsWith(matrix.os, 'ubuntu') }}
199212 run : echo "CACHE_PATH=${{ env.python_cache_ubuntu_path }}" >> $GITHUB_ENV
213+ - name : Cache path to load
214+ run : |
215+ echo "Path to dependency cache: [${{ env.CACHE_PATH }}]"
200216 - name : Load Python Dependencies from cache
217+ if : ${{ ! startsWith(matrix.os, 'windows') }}
201218 uses : actions/cache@v2
202219 with :
203220 path : ${{ env.CACHE_PATH }}
204221 key : ${{ matrix.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/dev-requirements.txt') }}
205222 restore-keys : |
206223 ${{ matrix.os }}-pip-${{ matrix.python-version }}
207- # env:
208- # CACHE_PATH: ${{ matrix.cache_path }}
224+ # env:
225+ # CACHE_PATH: ${{ matrix.cache_path }}
209226 - name : Install dependencies
210227 # Note
211228 # As a virtual machine is already being used, pipenv
0 commit comments