tests #254
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: tests | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| schedule: | |
| - cron: "0 4 * * 1" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| unit: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 35 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup micromamba | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-name: cityimage-unit | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| pip | |
| geopandas>=1.1.1 | |
| shapely>=2.1 | |
| pyproj>=3.4 | |
| numpy>=2.0 | |
| pandas>=2.2 | |
| networkx>=3.3 | |
| dask>=2025.7.0 | |
| igraph>=0.11.9 | |
| mapclassify>=2.6 | |
| matplotlib>=3.8 | |
| osmnx>=2.0.5 | |
| psutil>=5.9 | |
| python-louvain>=0.16 | |
| pyvista>=0.45.3 | |
| rasterio>=1.3 | |
| rasterstats>=0.19 | |
| tqdm>=4.65.0 | |
| cache-environment: true | |
| cache-downloads: true | |
| - name: Install package with all optional extras | |
| shell: bash -l {0} | |
| run: | | |
| python -m pip install -U pip | |
| python -m pip install -e ".[all,test]" | |
| - name: Check installed dependencies | |
| shell: bash -l {0} | |
| run: python -m pip check | |
| - name: Compile Python files | |
| shell: bash -l {0} | |
| run: python -m compileall cityImage tests | |
| - name: Run non-network tests | |
| shell: bash -l {0} | |
| run: pytest -m "not network" --cov=cityImage --cov-report=term-missing --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./coverage.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| full-optional: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.12"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup micromamba | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-name: cityimage-full | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| pip | |
| geopandas>=1.1.1 | |
| shapely>=2.1 | |
| pyproj>=3.4 | |
| numpy>=2.0 | |
| pandas>=2.2 | |
| networkx>=3.3 | |
| dask>=2025.7.0 | |
| igraph>=0.11.9 | |
| mapclassify>=2.6 | |
| matplotlib>=3.8 | |
| osmnx>=2.0.5 | |
| psutil>=5.9 | |
| python-louvain>=0.16 | |
| pyvista>=0.45.3 | |
| rasterio>=1.3 | |
| rasterstats>=0.19 | |
| tqdm>=4.65.0 | |
| cache-environment: true | |
| cache-downloads: true | |
| - name: Install package with all optional extras | |
| shell: bash -l {0} | |
| run: | | |
| python -m pip install -U pip | |
| python -m pip install -e ".[all,test]" | |
| - name: Check installed dependencies | |
| shell: bash -l {0} | |
| run: python -m pip check | |
| - name: Compile Python files | |
| shell: bash -l {0} | |
| run: python -m compileall cityImage tests | |
| - name: Run non-network tests with all optional extras | |
| shell: bash -l {0} | |
| run: pytest -m "not network" -ra | |
| network-integration: | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup micromamba | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-name: cityimage-network | |
| create-args: >- | |
| python=3.12 | |
| pip | |
| geopandas>=1.1.1 | |
| shapely>=2.1 | |
| pyproj>=3.4 | |
| numpy>=2.0 | |
| pandas>=2.2 | |
| networkx>=3.3 | |
| dask>=2025.7.0 | |
| igraph>=0.11.9 | |
| mapclassify>=2.6 | |
| matplotlib>=3.8 | |
| osmnx>=2.0.5 | |
| psutil>=5.9 | |
| python-louvain>=0.16 | |
| pyvista>=0.45.3 | |
| rasterio>=1.3 | |
| rasterstats>=0.19 | |
| tqdm>=4.65.0 | |
| cache-environment: true | |
| cache-downloads: true | |
| - name: Install package with all optional extras | |
| shell: bash -l {0} | |
| run: | | |
| python -m pip install -U pip | |
| python -m pip install -e ".[all,test]" | |
| - name: Check installed dependencies | |
| shell: bash -l {0} | |
| run: python -m pip check | |
| - name: Compile Python files | |
| shell: bash -l {0} | |
| run: python -m compileall cityImage tests | |
| - name: Run live OSM/network tests | |
| shell: bash -l {0} | |
| run: pytest -m network -ra |