Skip to content

Revert gdal, no 3.12 #223

Revert gdal, no 3.12

Revert gdal, no 3.12 #223

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Unit tests for HazImp
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
Hazimp:
name: Test HazImp
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Cache conda
uses: actions/cache@v2
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{hashFiles('hazimp.yml') }}
- name: Set up environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
auto-update-conda: false
channels: conda-forge,defaults
channel-priority: true
python-version: ${{ matrix.python-version }}
activate-environment: hazimp
environment-file: hazimp.yml
auto-activate-base: false
use-only-tar-bz2: true
- name: set pythonpath
run: |
echo "PYTHONPATH=$GITHUB_WORKSPACE/$PACKAGE" >> $GITHUB_ENV
- name: Test with pyest
shell: bash -l {0}
run: |
pytest --cov-report xml:coverage.xml --cov=hazimp
- name: Upload coverage.xml as artifact
uses: actions/upload-artifact@v4
with:
name: coverage report
path: coverage-${{ matrix.python-version }}.xml
- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: PYTHON
files: ./coverage-${{ matrix.python-version }}.xml