Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Test code coverage (#202)
Browse files Browse the repository at this point in the history
* Workflow changes for AD release

Update release workflow to be triggered only,
when a new tag is pushed ( starts with v )

* Add badge for testing and code coverage
Added flag: cli for cli project
Added flag: plugin for java
* Include threshold
* Include flag in code covereage
  • Loading branch information
VijayanB authored and yizheliu-amazon committed Aug 28, 2020
1 parent 6a5e322 commit d5e1203
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ jobs:
uses: codecov/codecov-action@v1
with:
file: ./build/reports/jacoco/test/jacocoTestReport.xml
flags: plugin

7 changes: 5 additions & 2 deletions .github/workflows/esad-cli-publish-artifact-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Publish
on: [pull_request, push]
name: Publish AD CLI
on:
push:
tags:
- v*

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/esad-cli-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ jobs:
with:
token: ${{secrets.CODECOV_TOKEN}}
file: cli/coverage.out
flags: unittests
flags: cli
name: codecov-umbrella
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![AD Test](https://github.com/opendistro-for-elasticsearch/anomaly-detection/workflows/Build%20and%20Test%20Anomaly%20detection/badge.svg)](https://github.com/opendistro-for-elasticsearch/anomaly-detection/actions?query=workflow%3A%22Build+and+Test+Anomaly+detection%22+branch%3A%22master%22)
[![codecov](https://codecov.io/gh/opendistro-for-elasticsearch/anomaly-detection/branch/master/graph/badge.svg)](https://codecov.io/gh/opendistro-for-elasticsearch/anomaly-detection)
[![codecov](https://codecov.io/gh/opendistro-for-elasticsearch/anomaly-detection/branch/master/graph/badge.svg?flag=plugin)](https://codecov.io/gh/opendistro-for-elasticsearch/anomaly-detection)
[![Documentation](https://img.shields.io/badge/doc-reference-blue)](https://opendistro.github.io/for-elasticsearch-docs/docs/ad/)
[![Forum](https://img.shields.io/badge/chat-on%20forums-blue)](https://discuss.opendistrocommunity.dev/c/Use-this-category-for-all-questions-around-machine-learning-plugins)
![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)
Expand Down
3 changes: 2 additions & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![AD CLI Test and Build](https://github.com/opendistro-for-elasticsearch/anomaly-detection/workflows/AD%20CLI%20Test%20and%20Build/badge.svg)
[![AD CLI Test](https://github.com/opendistro-for-elasticsearch/anomaly-detection/workflows/AD%20CLI%20Test%20and%20Build/badge.svg)](https://github.com/opendistro-for-elasticsearch/anomaly-detection/actions?query=workflow%3A%22AD+CLI+Test+and+Build%22+branch%3Amaster)
[![codecov](https://codecov.io/gh/opendistro-for-elasticsearch/anomaly-detection/branch/master/graph/badge.svg?flag=cli)](https://codecov.io/gh/opendistro-for-elasticsearch/anomaly-detection)
# Open Distro for Elasticsearch AD CLI

The AD CLI component in Open Distro for Elasticsearch (ODFE) is a command line interface for ODFE AD plugin.
Expand Down
30 changes: 30 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
coverage:
status:
project:
default:
threshold: 1
target: auto
plugin:
target: 70%
paths:
- "!cli/"
flags:
- plugin
cli:
target: 78%
paths:
- "cli/"
flags:
- cli
comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false
require_base: no
require_head: no
branches: null
flags:
plugin:
carryforward: true
cli:
carryforward: true

0 comments on commit d5e1203

Please sign in to comment.