Skip to content

Commit

Permalink
Add code cov back (#98)
Browse files Browse the repository at this point in the history
Signed-off-by: Zhongnan Su <szhongna@amazon.com>
  • Loading branch information
zhongnansu authored Jun 24, 2021
1 parent 3bcef87 commit 15cb8e8
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ jobs:
with:
timeout_minutes: 30
max_attempts: 3
command: cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn test
command: cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn test --coverage

- name: Upload coverage
uses: codecov/codecov-action@v1
with:
flags: dashboards-reports
directory: OpenSearch-Dashboards/plugins/
token: ${{ secrets.CODECOV_TOKEN }}

- name: Build Artifact
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Test and Build Reports Scheduler

on: [push, pull_request]


jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -54,6 +55,13 @@ jobs:
cd reports-scheduler
./gradlew build -Dopensearch.version=1.0.0-rc1
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
flags: reports-scheduler
directory: reports-scheduler/
token: ${{ secrets.CODECOV_TOKEN }}

- name: Create Artifact Path
run: |
mkdir -p reports-scheduler-builds
Expand Down
39 changes: 39 additions & 0 deletions reports-scheduler/.codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
##
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.
##

##
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.
#
##

codecov:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "70...100"
status:
project:
default:
target: 70% # the required coverage value
threshold: 1% # the leniency in hitting the target

0 comments on commit 15cb8e8

Please sign in to comment.