Correct docker setup #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lisflood Lisvap Unit Tests | |
| on: [push] | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| python-version: ["3.8"] | |
| steps: | |
| - name: Checkout github repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Miniconda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| python-version: 3.8 | |
| miniforge-version: latest | |
| - name: Conda info | |
| shell: bash -el {0} | |
| run: conda info | |
| - name: Install system dependencies | |
| shell: bash -el {0} | |
| run: | | |
| conda install -c conda-forge "gcc=12.1.0" "gdal<=3.9.2" eccodes hdf5 | |
| - name: Install dependencies | |
| shell: bash -el {0} | |
| run: | | |
| pip install -r requirements.txt | |
| pip install . | |
| - name: Check installation | |
| shell: bash -el {0} | |
| run: | | |
| gdal-config --version | |
| python -c "from osgeo import gdal; print(gdal.__version__)" | |
| conda list | |
| - name: Test with pytest | |
| shell: bash -el {0} | |
| run: | | |
| pip install pytest pytest-cov | |
| pytest |