Skip to content

Commit

Permalink
ci/ga: Add a CI run with version restricted dependencies
Browse files Browse the repository at this point in the history
Restrict dependencies to the lowest supported version.

Signed-off-by: Jan Vesely <[email protected]>
  • Loading branch information
jvesely committed Oct 18, 2023
1 parent f22fdb7 commit 6984c76
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/pnl-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
python-architecture: ['x64']
extra-args: ['']
os: [ubuntu, macos, windows]
version-restrict: ['']
include:
# code-coverage build on macos python 3.9
- python-version: '3.9'
Expand All @@ -78,11 +79,18 @@ jobs:
- python-version: '3.10'
os: macos
# pytest needs both '--benchmark-only' and '-m benchmark'
# The former fails the test if benchamrks cannot be enabled
# The former fails the test if benchmarks cannot be enabled
# (e.g. due to --dist setting)
# The latter works around a crash in pytest when collecting tests:
# https://github.com/ionelmc/pytest-benchmark/issues/243
extra-args: '-m benchmark --benchmark-enable --benchmark-only --benchmark-min-rounds=2 --benchmark-max-time=0.001 --benchmark-warmup=off -n0 --dist=no'

# add python 3.7 with deps restricted to min supported version
- python-version: '3.7'
python-architecture: 'x64'
os: ubuntu
version-restrict: 'min'

# add python 3.8 build on macos since 3.7 is broken
# https://github.com/actions/virtual-environments/issues/4230
- python-version: '3.8'
Expand Down Expand Up @@ -115,6 +123,13 @@ jobs:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.python-architecture }}

- name: Restrict version of direct dependencies
if: ${{ matrix.restrict-version == 'min' }}
shell: bash
run: |
sed -i '/^[^#]/s/>=/==/' *requirements.txt
git commit -a -m "Restrict version of direct dependencies to min"
- name: Get pip cache location
shell: bash
id: pip_cache
Expand Down

0 comments on commit 6984c76

Please sign in to comment.