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

chore: add coverage badge to README #91

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
25 changes: 25 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ on:

jobs:
coverage:
if: github.actor != 'dependabot[bot]' || github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
id-token: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -35,3 +41,22 @@ jobs:
update-comment: true
min-coverage-overall: 80
coverage-counter-type: LINE

- name: Create coverage stats
run: |
mkdir ${{ github.workspace }}/chat-android/build/badges
echo '{"schemaVersion":1,"label":"coverage","message":"${{ steps.kover.outputs.coverage-overall }}%","color":"hsl(109, 100%, 40%)"}' > ${{ github.workspace }}/chat-android/build/badges/code-coverage-badge.json

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
role-to-assume: arn:aws:iam::${{ secrets.ABLY_AWS_ACCOUNT_ID_SDK }}:role/ably-sdk-builds-ably-chat-kotlin
role-session-name: "${{ github.run_id }}-${{ github.run_number }}"

- name: Upload Coverage Badge
uses: ably/sdk-upload-action@v2
with:
sourcePath: ${{ github.workspace }}/chat-android/build/badges
githubToken: ${{ secrets.GITHUB_TOKEN }}
artifactName: badges
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<img src="https://img.shields.io/badge/development_status-Private_Beta-ab7df8" alt="Development status" />
<img src="https://badgen.net/github/license/3scale/saas-operator" alt="License" />
<img src="https://img.shields.io/badge/version-0.1.0--SNAPSHOT-2ea44f" alt="version: 0.1.0-SNAPSHOT" />
<a href="https://github.com/ably/ably-chat-kotlin/actions/workflows/coverage.yml"><img src="https://img.shields.io/static/v1?label=coverage&message=80%2B%25&color=2ea44f" alt="coverage - 80+%"></a>
<a href="https://github.com/ably/ably-chat-kotlin/actions/workflows/coverage.yml"><img src="https://img.shields.io/endpoint?url=https://sdk.ably.com/builds/ably/ably-chat-kotlin/main/badges/code-coverage-badge.json" alt="coverage - 80+%"></a>
</p>

Ably Chat is a set of purpose-built APIs for a host of chat features enabling you to create 1:1, 1:Many, Many:1 and Many:Many chat rooms for
Expand Down
Loading