Skip to content

Commit

Permalink
CI: try to add a np 2.0.0rc2 matrix node
Browse files Browse the repository at this point in the history
  • Loading branch information
megies committed May 24, 2024
1 parent cd08b60 commit c8f9860
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/test_conda_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
- decorator
- lxml
- matplotlib
- numpy
- numpy < 2
- scipy
- requests
- setuptools
Expand Down
27 changes: 27 additions & 0 deletions .github/test_conda_env_np2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: test
channels:
- conda-forge
- defaults
dependencies:
# obspy
- decorator
- lxml
- matplotlib
- numpy >= 2.0.0rc2
# dummy package needed to install the np2 rc via conda
- conda-forge/label/numpy_rc::_numpy_rc
- scipy
- requests
- setuptools
# see #3258
- sqlalchemy < 2.0
# soft dependencies
- cartopy
- geographiclib
- pyshp
# tests
- packaging
- pyproj
- pytest
- pytest-cov
- pytest-json-report >= 1.4
2 changes: 1 addition & 1 deletion .github/test_mindep_conda_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
- decorator
- lxml
- matplotlib
- numpy
- numpy < 2
- scipy
- requests
- setuptools
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ jobs:
- os: ubuntu-latest
python-version: '3.12'
options: default warnings
- os: ubuntu-latest
python-version: '3.12'
options: default warnings np2
- os: ubuntu-latest
python-version: '3.12'
options: ${{ (github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'test_network')) && 'network warnings' || 'default' }}
Expand All @@ -136,7 +139,7 @@ jobs:
# set individual cache key
cache_key: ${{ matrix.os }}-py${{ matrix.python-version }}-${{ contains(matrix.options, 'mindep') }}-${{ contains(matrix.options, 'mindepversion') }}
# set conda environment file with dependencies
env_file: .github/test${{ contains(matrix.options, 'mindepversion') && '_mindepversion' || contains(matrix.options, 'mindep') && '_mindep' || '' }}_conda_env.yml
env_file: .github/test${{ contains(matrix.options, 'np2') && '_np2' || contains(matrix.options, 'mindepversion') && '_mindepversion' || contains(matrix.options, 'mindep') && '_mindep' || '' }}_conda_env.yml
# set additional runtest options (--keep-images, --network, -W error)
runtest_options: ${{ github.event_name == 'pull_request' && '--keep-images' || '' }} ${{ contains(matrix.options, 'network') && '--network' || '' }} ${{ contains(matrix.options, 'warnings') && '-W error' || '' }}
steps:
Expand Down

0 comments on commit c8f9860

Please sign in to comment.