|
1 | 1 | name: Test pysteps
|
2 | 2 |
|
3 |
| -env: |
4 |
| - MINIMAL_DEPENDENCIES: cython numpy jsmin jsonschema matplotlib netCDF4 opencv pillow pyproj scipy dask |
5 |
| - OPTIONAL_DEPENDENCIES: pyfftw cartopy h5py PyWavelets pandas scikit-image |
6 |
| - TEST_DEPENDENCIES: pytest pytest-cov |
7 |
| - |
8 | 3 | on:
|
9 |
| - # Triggers the workflow on push or pull request events but only for the master branch |
| 4 | + # Triggers the workflow on push or pull request events to the master branch |
10 | 5 | push:
|
11 | 6 | branches: [ master ]
|
12 | 7 | pull_request:
|
@@ -34,26 +29,16 @@ jobs:
|
34 | 29 | with:
|
35 | 30 | python-version: ${{ matrix.python-version }}
|
36 | 31 |
|
37 |
| - - name: Setup Miniconda |
38 |
| - uses: conda-incubator/setup-miniconda@v2.0.0 |
| 32 | + - name: Install mamba and create environment |
| 33 | + uses: mamba-org/provision-with-micromamba@main |
39 | 34 | with:
|
40 |
| - python-version: ${{ matrix.python-version }} |
41 |
| - mamba-version: "*" |
42 |
| - auto-update-conda: true |
43 |
| - channels: conda-forge |
44 |
| - channel-priority: flexible |
45 |
| - activate-environment: test-environment |
| 35 | + environment-file: ci/ci_test_env.yml |
| 36 | + environment-name: test_environment |
| 37 | + extra-specs: python=${{ matrix.python-version }} |
46 | 38 |
|
47 |
| - - name: Install dependencies |
48 |
| - env: |
49 |
| - PACKAGES: ${{env.MINIMAL_DEPENDENCIES}} ${{env.OPTIONAL_DEPENDENCIES}} ${{env.TEST_DEPENDENCIES}} |
50 |
| - run: | |
51 |
| - if [ "$RUNNER_OS" == "Windows" ]; then |
52 |
| - mamba.bat install --quiet ${{env.PACKAGES}} |
53 |
| - else |
54 |
| - mamba install --quiet ${{env.PACKAGES}} |
55 |
| - fi |
56 |
| - pip install -U cookiecutter |
| 39 | + - name: Install pygrib (not win) |
| 40 | + if: matrix.os != 'windows-latest' |
| 41 | + run: mamba install --quiet pygrib |
57 | 42 |
|
58 | 43 | - name: Install pysteps for MacOS
|
59 | 44 | if: matrix.os == 'macos-latest'
|
|
69 | 54 | gcc-9 --version || brew install gcc@9
|
70 | 55 | pip install .
|
71 | 56 |
|
72 |
| - - name: Install pygrib (not win) |
73 |
| - if: matrix.os != 'windows-latest' |
74 |
| - run: conda install --quiet pygrib |
75 |
| - |
76 | 57 | - name: Install pysteps
|
77 | 58 | if: matrix.os != 'macos-latest'
|
78 | 59 | working-directory: ${{github.workspace}}
|
|
87 | 68 | - name: Check imports
|
88 | 69 | working-directory: ${{github.workspace}}/pysteps_data
|
89 | 70 | run: |
|
| 71 | + python --version |
90 | 72 | python -c "import pysteps; print(pysteps.__file__)"
|
91 | 73 | python -c "from pysteps import motion"
|
92 | 74 | python -c "from pysteps.motion import vet"
|
|
0 commit comments