Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding code coverage workflow #64

Merged
merged 13 commits into from
Apr 4, 2024
26 changes: 0 additions & 26 deletions .github/workflows/test_model.yaml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/test_model.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: model

on:
pull_request:
push:
branches: [main]

jobs:
install-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: cache poetry
uses: actions/cache@v4
with:
path: ~/.local
key: ${{ runner.os }}-poetry
- name: install poetry
run: pip install poetry

- name: install package
run: poetry install -C model

- name: install pytest-cov
run: poetry run -C model pip install pytest-cov

- name: run tests
run: |
poetry run -C model pytest \
--cov=pyrenew --cov-report term --cov-report xml model

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
file: coverage.xml
plugin: pycoverage
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
2 changes: 1 addition & 1 deletion .github/workflows/test_pipeline.yaml → .github/workflows/test_pipeline.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: installation and testing pipeline
name: pipeline

on:
pull_request:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Sphinx: Render docs"
name: website

on:
push:
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
⚠️ This is a work in progress ⚠️

[![Pre-commit](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/pre-commit.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/pre-commit.yaml)
[![installation and testing model](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/test_model.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/test_model.yaml)
[![installation and testing pipeline](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/test_pipeline.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/test_pipeline.yaml)
[![Docs: model](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/sphinx.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/sphinx.yaml)
[![installation and testing model](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/model.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/model.yaml)
[![installation and testing pipeline](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/pipeline.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/pipeline.yaml)
[![Docs: model](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/website.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/website.yaml)
[![codecov (model)](https://codecov.io/gh/CDCgov/multisignal-epi-inference/graph/badge.svg?token=7Z06HOMYR1)](https://codecov.io/gh/CDCgov/multisignal-epi-inference)

This repo hosts the multisignal (*a.k.a.* signal fusion) renewal project: an internal forecasting model that leverages multiple data sources for enhancing epidemiological modeling of infectious disease outbreaks.

Expand Down