diff --git a/.github/workflows/CI_Tests.yml b/.github/workflows/CI_Tests.yml index fded29d1..54fe4066 100644 --- a/.github/workflows/CI_Tests.yml +++ b/.github/workflows/CI_Tests.yml @@ -29,9 +29,16 @@ jobs: - name: Install this package run: pip install -e '.[dev]' - - name: Run pytest - run: pytest + - name: Run tests and generate coverage reports + run: pytest --cov tests/ + - name: Upload coverage reports to codecov + if: runner.os == 'Linux' + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.info + - name: Run the smoke tests run: | music_box -c src/acom_music_box/examples/configs/analytical/my_config.json -o output.csv diff --git a/README.md b/README.md index 4e1cf4a5..019c8669 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ MusicBox: A MUSICA model for boxes and columns. [![License](https://img.shields.io/github/license/NCAR/music-box.svg)](https://github.com/NCAR/music-box/blob/main/LICENSE) [![CI Status](https://github.com/NCAR/music-box/actions/workflows/CI_Tests.yml/badge.svg)](https://github.com/NCAR/music-box/actions/workflows/CI_Tests.yml) +[![codecov](https://codecov.io/github/NCAR/music-box/graph/badge.svg?token=OR7JEQJSRQ)](https://codecov.io/github/NCAR/music-box) [![PyPI version](https://badge.fury.io/py/acom-music-box.svg)](https://badge.fury.io/py/acom-music-box) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14008358.svg)](https://doi.org/10.5281/zenodo.14008358) diff --git a/pyproject.toml b/pyproject.toml index 1f59b3d8..0a2eda7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,5 +41,6 @@ waccmToMusicBox = "acom_music_box.tools.waccmToMusicBox:main" [project.optional-dependencies] dev = [ "pytest", - "pytest-mock" + "pytest-mock", + "pytest-cov" ] \ No newline at end of file