Skip to content

Commit

Permalink
chore: add coveralls coverage badges
Browse files Browse the repository at this point in the history
  • Loading branch information
ngurenyaga committed Jul 8, 2021
1 parent 7b6edba commit dd8e309
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ env:
CELERY_BROKER_URL: ${{ secrets.CELERY_BROKER_URL }}
GOOGLE_APPLICATION_CREDENTIALS: "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}"
DJANGO_GCP_STORAGE_BUCKET_NAME: ${{ secrets.DJANGO_GCP_STORAGE_BUCKET_NAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
linter:
Expand Down Expand Up @@ -70,6 +71,7 @@ jobs:
mypy .
pytest:
needs: linter
runs-on: ubuntu-latest

# Service containers to run with `container-job`
Expand Down Expand Up @@ -108,21 +110,23 @@ jobs:
env:
SECRET_PASSPHRASE: ${{ secrets.SECRET_PASSPHRASE }}

- name: Install Python requirements
- name: Install requirements
run: |
pip install -r requirements/local.txt && pip install -r requirements/production.txt
npm ci
- name: Install NodeJS requirements
run: npm ci

- name: Run migrations
- name: Set up Django
run: |
python manage.py migrate
- name: Collect static files
run: |
python manage.py collectstatic --noinput
- name: Run tests
- name: Run tests and collect coverage
run: |
pytest
coveralls --service=github
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ PEPFAR Monitoring, Learning and Evaluation

Field Reporting Database for PEPFAR Monitoring, Learning and Evaluation.

![example workflow](https://github.com/savannahghi/mle/actions/workflows/ci.yml/badge.svg)
![Linting and Tests](https://github.com/savannahghi/mle/actions/workflows/ci.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/savannahghi/mle/badge.svg?branch=main)](https://coveralls.io/github/savannahghi/mle?branch=main)

Environment variables
---------------------
Expand Down
1 change: 1 addition & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ uvicorn[standard]==0.14.0 # https://github.com/encode/uvicorn
django-phonenumber-field~=5.2.0
phonenumbers~=8.12.26
Fraction~=1.5.1
coveralls~=3.1.0

# Django
# ------------------------------------------------------------------------------
Expand Down

0 comments on commit dd8e309

Please sign in to comment.