Skip to content

Commit 829345e

Browse files
committed
💚️removed pre releases retrieval
1 parent 78a5bee commit 829345e

File tree

2 files changed

+57
-36
lines changed

2 files changed

+57
-36
lines changed

.github/workflows/ci.yml

+52-32
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ on:
77
branches: [ main ]
88

99
env:
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+
1615
jobs:
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.10
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,46 @@ 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: |
197+
python -m pip install --upgrade pipenv
198+
python -m pipenv -V
199+
name: Install latest pipenv
200+
- if: ${{ !startsWith(matrix.os, 'windows') }}
201+
run: |
202+
python -m pip install pipenv==${{ env.pipenv_version }}
203+
name: Install a fixed version of pipenv [${{ env.pipenv_version }}]
184204
- name: Determine dependencies [OS:${{ matrix.os }}, Python:${{ matrix.python-version }}]
185205
# Note
186206
# The below code generates a pip requirements file from the pipenv development requirements (also obtaining the
187207
# 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.
190208
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
209+
python -m pipenv lock --dev -r > dev-requirements.txt
194210
- if: ${{ startsWith(matrix.os, 'macOS') }}
195211
run: echo "CACHE_PATH=${{ env.python_cache_macOS_path }}" >> $GITHUB_ENV
196212
- if: ${{ startsWith(matrix.os, 'windows') }}
197213
run: echo "CACHE_PATH=${{ env.python_cache_windows_path }}" >> $GITHUB_ENV
198214
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
199215
run: echo "CACHE_PATH=${{ env.python_cache_ubuntu_path }}" >> $GITHUB_ENV
216+
- name: Cache path to load
217+
run: |
218+
echo "Path to dependency cache: [${{ env.CACHE_PATH }}]"
200219
- name: Load Python Dependencies from cache
220+
if: ${{ ! startsWith(matrix.os, 'windows') }}
201221
uses: actions/cache@v2
202222
with:
203223
path: ${{ env.CACHE_PATH }}
204224
key: ${{ matrix.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/dev-requirements.txt') }}
205225
restore-keys: |
206226
${{ matrix.os }}-pip-${{ matrix.python-version }}
207-
# env:
208-
# CACHE_PATH: ${{ matrix.cache_path }}
227+
# env:
228+
# CACHE_PATH: ${{ matrix.cache_path }}
209229
- name: Install dependencies
210230
# Note
211231
# As a virtual machine is already being used, pipenv

.github/workflows/release.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: GitHub Release
22

33
env:
4-
go_version: "1.16"
4+
pipenv_version: 2021.5.29 # FIXME upgrade pipenv when https://github.com/pypa/pipenv/issues/4430 is actually fixed
55

66
on:
77
workflow_dispatch:
@@ -23,15 +23,16 @@ jobs:
2323
# normal dependencies from setup.py).
2424
# This code also forces the system to install latest tools as the ones present on the CI system may be too old
2525
# for the process to go through properly.
26+
# FIXME upgrade pipenv when https://github.com/pypa/pipenv/issues/4430 is actually fixed
2627
run: |
2728
python -m pip install --upgrade pip wheel setuptools
28-
python -m pip install flake8 pipenv pytest
29-
python -m pipenv lock --dev -r --pre > dev-requirements.txt
29+
python -m pip install pipenv==${{ env.pipenv_version }}
30+
python -m pipenv lock --dev -r > dev-requirements.txt
3031
- uses: FranzDiebold/github-env-vars-action@v2
3132
- name: Load Python Dependencies from cache
3233
uses: actions/cache@v2
3334
with:
34-
path: ${{ env.python_cache_ubuntu_path }}
35+
path: ~/.cache/pip
3536
key: linux-pip-3-continuous-delivery-scripts
3637
- name: Install dependencies
3738
# Note

0 commit comments

Comments
 (0)