Skip to content

Add code coverage badge workflow #1

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/zulip-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ jobs:
run: |
source zulip-api-py3-venv/bin/activate
tools/test-main
TOTAL=`coverage report | grep TOTAL | grep -Eo '[0-9]+\.?[0-9]+%'`
echo $TOTAL
echo "ANSWER=$TOTAL" >> $GITHUB_ENV


- if: runner.os == 'Windows'
name: Running Test-Suite on Windows
Expand All @@ -62,3 +66,13 @@ jobs:

- name: Codecov
uses: codecov/codecov-action@v1.2.1

- name: Create coverage badge
uses: schneegans/dynamic-badges-action@v1.0.0
with:
auth: ${{ secrets.GIST_ZULIP_SECRET }}
gistID: 571ad3425f4395d6fed54854055ce654
filename: test.json
label: code coverage
message: ${{ env.ANSWER }}
color: green
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build status](https://github.com/zulip/python-zulip-api/workflows/build/badge.svg?branch=master)](
https://github.com/zulip/python-zulip-api/actions?query=branch%3Amaster+workflow%3Abuild)
[![Coverage status](https://img.shields.io/codecov/c/github/zulip/python-zulip-api/master.svg)](
[![Coverage status](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Ponni-M/571ad3425f4395d6fed54854055ce654/raw/test.json)](
https://codecov.io/gh/zulip/python-zulip-api)

This repository contains the source code for Zulip's PyPI packages:
Expand Down