Stable version of the fiat_integrator #130
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 ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
Test: | |
name: ${{ matrix.os }} - py${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] #, "macos-latest", "windows-latest"] | |
python-version: ["3.10"] | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Setup Mambaforge | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: "3.10" | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
channels: conda-forge | |
activate-environment: hydromt-fiat-dev | |
use-mamba: true | |
- 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@v3 | |
with: | |
path: /usr/share/miniconda3/envs/hydromt-fiat-dev | |
key: docs-conda-${{ hashFiles('envs/hydromt-fiat-dev.yml') }}-${{ env.DATE }} | |
id: cache | |
- name: Update environment & write to cache | |
run: mamba env update -n hydromt-fiat-dev -f envs/hydromt-fiat-dev.yml | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Install hydromt-fiat | |
run: pip install . | |
- name: Test | |
run: python -m pytest --verbose --cov=hydromt_fiat --cov-report xml | |
- name: Check style | |
run: black --check . | |
- uses: codecov/codecov-action@v1 |