diff --git a/.github/workflows/pnl-ci.yml b/.github/workflows/pnl-ci.yml index 8235041211d..cdb4e54e947 100644 --- a/.github/workflows/pnl-ci.yml +++ b/.github/workflows/pnl-ci.yml @@ -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' @@ -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' @@ -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