Deltares / hydromt_delft3dfm

Delft3D FM plugin for HydroMT
https://deltares.github.io/hydromt_delft3dfm/
GNU General Public License v3.0
7 stars 1 forks source link

add codecov to pytest #20

Closed veenstrajelmer closed 1 year ago

veenstrajelmer commented 1 year ago
    - name: Test with pytest
      run: |
        pytest -m "not acceptance" --cov=hydromt_delft3dfm --cov-report xml --cov-report term
    - uses: codecov/codecov-action@v1

[![codecov](https://img.shields.io/codecov/c/github/deltares/hydromt_delft3dfm.svg?style=flat-square)](https://app.codecov.io/gh/deltares/hydromt_delft3dfm)

xldeltares commented 1 year ago

The test was successful but with the following error message: {'detail': ErrorDetail(string='Missing "owner" argument. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}

Potentially helpful post on this issue: https://stackoverflow.com/questions/67861379/codecov-fails-in-github-actions

veenstrajelmer commented 1 year ago

Solved with a minor change, but probably just works because it was the second try of codecov (I've seen the first ones failing more often): https://github.com/Deltares/hydromt_delft3dfm/actions/runs/5451925967/jobs/9918752743

There is now codecov data for the branch: https://app.codecov.io/gh/Deltares/hydromt_delft3dfm/tree/15-fix-tests