Skip to content

Commit

Permalink
test on numpy1 and numpy2
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyleung521 committed Jan 22, 2025
1 parent d899fc3 commit df855a9
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ jobs:
pre-commit run --all-files
test:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}, Numpy ${{ matrix.numpy-version }}
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: ["ubuntu-latest", "macos-13", "macos-latest"] # macos-13 is x86-64, macos-latest is arm64
python-version: ["3.9", "3.10", "3.11", "3.12"]
numpy-version: ['1', '2']

steps:
- uses: actions/checkout@v4
Expand All @@ -53,7 +54,7 @@ jobs:
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: devtools/conda-envs/test_env.yaml
environment-file: devtools/conda-envs/test_env_numpy${{ matrix.numpy-version }}.yaml
activate-environment: test_env
channel-priority: true
auto-update-conda: true
Expand Down
25 changes: 25 additions & 0 deletions devtools/conda-envs/test_env_numpy1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: test_env
channels:
- conda-forge
- defaults
dependencies:
- python
- cython
- numpy=1
- scipy
- h5py
- pyyaml
- pyzmq
- matplotlib-base
- blessings
- ipykernel
- mpi4py
- tqdm
- mdtraj
- netCDF4
# testing
- pytest
- pytest-cov
- pytest-rerunfailures
- pytest-timeout
- codecov
24 changes: 24 additions & 0 deletions devtools/conda-envs/test_env_numpy2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: test_env
channels:
- conda-forge
- defaults
dependencies:
- python
- cython
- numpy
- scipy
- h5py
- pyyaml
- pyzmq
- matplotlib-base
- blessings
- ipykernel
- mpi4py
- tqdm
- mdtraj
# testing
- pytest
- pytest-cov
- pytest-rerunfailures
- pytest-timeout
- codecov

0 comments on commit df855a9

Please sign in to comment.