Skip to content

15 fix tests

15 fix tests #19

Workflow file for this run

name: ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
max-parallel: 5
matrix:
python-version: [3.9]
os: ["windows-latest"]
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
channels: conda-forge
channel-priority: strict
environment-file: envs/hydromt-delft3dfm.yml
activate-environment: hydromt-delft3dfm
- name: Conda info
run: |
conda info
conda list
- name: Install hydromt_delft3dfm
run: |
flit install --pth-file
hydromt --models
- name: Test with pytest
run: |
python -m pytest --cov=hydromt_delft3dfm --cov-report xml --cov-report term
- uses: codecov/codecov-action@v3
- name: Autoformat
if: ${{ (matrix.os == 'windows-latest') && (matrix.python-version == 3.9) }}
run: |
python -m black .
git config --global user.name '${{ github.actor }}'
git config --global user.email '${{ github.actor }}@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git checkout $GITHUB_HEAD_REF
git commit -am "autoformat: black" && git push || true