Combining multiple CSVs into one Dataset #1182
Workflow file for this run
This file contains 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] | |
paths: | |
- tests/* | |
- hydromt/* | |
- data/* | |
- pyproject.toml | |
pull_request: | |
branches: | |
- main | |
paths: | |
- tests/* | |
- hydromt/* | |
- data/* | |
- pyproject.toml | |
jobs: | |
build: | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.9','3.10','3.11'] | |
name: py ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ matrix.python-version }}-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Mambaforge | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
activate-environment: hydromt | |
use-mamba: true | |
- name: Generate env spec | |
run: pip install tomli && python make_env.py test,io,extra | |
- name: Set cache date | |
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV | |
- name: load from cache if it exists for our environment | |
uses: actions/cache@v2 | |
with: | |
path: /usr/share/miniconda3/envs/hydromt | |
key: ${{ matrix.python-version }}-conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }} | |
id: cache | |
- name: Update environment & write to cache | |
run: mamba env update -n hydromt -f environment.yml | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Test | |
run: python -m pytest --verbose --cov=hydromt --cov-report xml | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v3 |