Merge pull request #27421 from surajshetty3416/enable-codecov
ci: Use codecov for coverage reporting
This commit is contained in:
commit
df913ac036
38
.github/workflows/server-tests.yml
vendored
38
.github/workflows/server-tests.yml
vendored
@ -99,34 +99,10 @@ jobs:
|
|||||||
CI_BUILD_ID: ${{ github.run_id }}
|
CI_BUILD_ID: ${{ github.run_id }}
|
||||||
ORCHESTRATOR_URL: http://test-orchestrator.frappe.io
|
ORCHESTRATOR_URL: http://test-orchestrator.frappe.io
|
||||||
|
|
||||||
- name: Upload Coverage Data
|
- name: Upload coverage data
|
||||||
run: |
|
uses: codecov/codecov-action@v2
|
||||||
cp ~/frappe-bench/sites/.coverage ${GITHUB_WORKSPACE}
|
with:
|
||||||
cd ${GITHUB_WORKSPACE}
|
name: MariaDB
|
||||||
pip3 install coverage==5.5
|
fail_ci_if_error: true
|
||||||
pip3 install coveralls==3.0.1
|
files: /home/runner/frappe-bench/sites/coverage.xml
|
||||||
coveralls
|
verbose: true
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
|
|
||||||
COVERALLS_FLAG_NAME: run-${{ matrix.container }}
|
|
||||||
COVERALLS_SERVICE_NAME: ${{ github.event_name == 'pull_request' && 'github' || 'github-actions' }}
|
|
||||||
COVERALLS_PARALLEL: true
|
|
||||||
|
|
||||||
coveralls:
|
|
||||||
name: Coverage Wrap Up
|
|
||||||
needs: test
|
|
||||||
container: python:3-slim
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Clone
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Coveralls Finished
|
|
||||||
run: |
|
|
||||||
cd ${GITHUB_WORKSPACE}
|
|
||||||
pip3 install coverage==5.5
|
|
||||||
pip3 install coveralls==3.0.1
|
|
||||||
coveralls --finish
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
[![CI](https://github.com/frappe/erpnext/actions/workflows/server-tests.yml/badge.svg?branch=develop)](https://github.com/frappe/erpnext/actions/workflows/server-tests.yml)
|
[![CI](https://github.com/frappe/erpnext/actions/workflows/server-tests.yml/badge.svg?branch=develop)](https://github.com/frappe/erpnext/actions/workflows/server-tests.yml)
|
||||||
[![Open Source Helpers](https://www.codetriage.com/frappe/erpnext/badges/users.svg)](https://www.codetriage.com/frappe/erpnext)
|
[![Open Source Helpers](https://www.codetriage.com/frappe/erpnext/badges/users.svg)](https://www.codetriage.com/frappe/erpnext)
|
||||||
[![Coverage Status](https://coveralls.io/repos/github/frappe/erpnext/badge.svg?branch=develop)](https://coveralls.io/github/frappe/erpnext?branch=develop)
|
[![codecov](https://codecov.io/gh/frappe/erpnext/branch/develop/graph/badge.svg?token=0TwvyUg3I5)](https://codecov.io/gh/frappe/erpnext)
|
||||||
|
|
||||||
[https://erpnext.com](https://erpnext.com)
|
[https://erpnext.com](https://erpnext.com)
|
||||||
|
|
||||||
|
13
codecov.yml
Normal file
13
codecov.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
codecov:
|
||||||
|
require_ci_to_pass: yes
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
status:
|
||||||
|
project:
|
||||||
|
default:
|
||||||
|
target: auto
|
||||||
|
threshold: 0.5%
|
||||||
|
|
||||||
|
comment:
|
||||||
|
layout: "diff, files"
|
||||||
|
require_changes: true
|
Loading…
Reference in New Issue
Block a user