Skip to content

Commit

Permalink
Updated CI_Tests.yml to setup codecov (#280)
Browse files Browse the repository at this point in the history
* Updated CI_Tests.yml to setup codecov

* modified run cmd for codecov, removed action to run seperate tests

* moved codecov jobs before smoke tests

* added os.runner as linux, removed fail_ci_if_error and added codecov badge
  • Loading branch information
adityakiran1423 authored Nov 23, 2024
1 parent 3e3f542 commit 7079073
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/CI_Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ waccmToMusicBox = "acom_music_box.tools.waccmToMusicBox:main"
[project.optional-dependencies]
dev = [
"pytest",
"pytest-mock"
"pytest-mock",
"pytest-cov"
]

0 comments on commit 7079073

Please sign in to comment.