Skip to content

Commit

Permalink
Merge pull request #66 from heshanpadmasiri/heshan-codecov
Browse files Browse the repository at this point in the history
Generate code coverage reports with CodeCov
  • Loading branch information
NipunaRanasinghe authored Jul 25, 2023
2 parents 1282df1 + 9fcfaaf commit 91f7a4d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,18 @@ jobs:
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}

- name: Ballerina Test
uses: ballerina-platform/ballerina-action/@nightly
with:
args:
test --test-report --code-coverage --coverage-format=xml ./aad
env:
REFRESH_URL: ${{ secrets.REFRESH_URL }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
- name: Alert notifier on failure
if: failure() && (github.event.action == 'check_connector_for_breaking_changes')
run: |
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ jobs:
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
- name: Ballerina Test
uses: ballerina-platform/ballerina-action/@nightly
with:
args:
test --test-report --code-coverage --coverage-format=xml ./aad
env:
REFRESH_URL: ${{ secrets.REFRESH_URL }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3

# Send notification when build fails
- name: Notify failure
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,17 @@ jobs:
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
- name: Ballerina Test
# tests will be skipped if the PR is from a forked repository (as the secrets are not available)
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
uses: ballerina-platform/ballerina-action/@nightly
with:
args:
test --test-report --code-coverage --coverage-format=xml ./aad
env:
REFRESH_URL: ${{ secrets.REFRESH_URL }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Ballerina Azure Active Directory Connector
===================

[![Build Status](https://github.com/ballerina-platform/module-ballerinax-azure.ad/workflows/CI/badge.svg)](https://github.com/ballerina-platform/module-ballerinax-msgraph-teams/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/ballerina-platform/module-ballerinax-azure.ad/branch/master/graph/badge.svg)](https://codecov.io/gh/ballerina-platform/module-ballerinax-azure.ad)
[![GitHub Last Commit](https://img.shields.io/github/last-commit/ballerina-platform/module-ballerinax-azure.ad.svg)](https://github.com/ballerina-platform/module-ballerinax-msgraph-teams/commits/master)
[![GraalVM Check](https://github.com/ballerina-platform/module-ballerinax-azure.ad/actions/workflows/build-with-bal-test-native.yml/badge.svg)](https://github.com/ballerina-platform/module-ballerinax-azure.ad/actions/workflows/build-with-bal-test-native.yml)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
Expand Down

0 comments on commit 91f7a4d

Please sign in to comment.