Skip to content

Commit

Permalink
Require numpy 1.26* in test environment for now
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-pavlyk committed Jul 19, 2024
1 parent d929a95 commit a53c5bf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ jobs:
strategy:
matrix:
python: ['3.9', '3.10']
numpy: ['1.26*']
experimental: [false]
runner: [ubuntu-latest]
continue-on-error: ${{ matrix.experimental }}
Expand Down Expand Up @@ -132,7 +133,7 @@ jobs:
. $CONDA/etc/profile.d/conda.sh
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} python=${{ matrix.python }} numpy=${{ matrix.numpy }} $CHANNELS --only-deps --dry-run > lockfile
cat lockfile
- name: Set pkgs_dirs
run: |
Expand All @@ -154,7 +155,7 @@ jobs:
. $CONDA/etc/profile.d/conda.sh
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} pytest python=${{ matrix.python }} $CHANNELS
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} pytest python=${{ matrix.python }} numpy=${{ matrix.numpy }} $CHANNELS
# Test installed packages
conda list
- name: Run tests
Expand All @@ -170,6 +171,7 @@ jobs:
strategy:
matrix:
python: ['3.9', '3.10']
numpy: ['1.26*']
experimental: [false]
runner: [windows-2019]
continue-on-error: ${{ matrix.experimental }}
Expand Down Expand Up @@ -205,7 +207,7 @@ jobs:
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
SET PACKAGE_VERSION=%%F
)
conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} numpy=${{ matrix.numpy }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
more lockfile
- name: Cache conda packages
uses: actions/cache@v4
Expand All @@ -227,7 +229,7 @@ jobs:
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
SET PACKAGE_VERSION=%%F
)
conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% pytest python=${{ matrix.python }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }}
conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% pytest python=${{ matrix.python }} numpy=${{ matrix.numpy }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }}
# Test installed packages
conda list
- name: Run tests
Expand Down

0 comments on commit a53c5bf

Please sign in to comment.