1
0
Fork 0
mirror of https://github.com/containers/youki synced 2024-04-24 02:45:15 +02:00

add codecov

This commit is contained in:
yukang 2021-08-26 13:55:54 +00:00
parent 14856066b1
commit 743b6a6918
4 changed files with 37 additions and 0 deletions

15
.codecov.yml Normal file
View File

@ -0,0 +1,15 @@
---
codecov:
notify:
after_n_builds: 1
require_ci_to_pass: false
coverage:
precision: 2
round: down
range: 50..75
comment:
layout: "header, diff"
behavior: default
require_changes: false

7
.github/workflows/grcov.yml vendored Normal file
View File

@ -0,0 +1,7 @@
branch: true
ignore-not-existing: true
llvm: true
filter: covered
output-type: lcov
output-path: ./lcov.info
prefix-dir: /home/user/build/

View File

@ -61,11 +61,25 @@ jobs:
run: ./build.sh --release
- name: Run tests
run: cargo test
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
- name: Run doc tests
run: cargo test --doc
- name: Run cgroup tests
working-directory: cgroups
run: cargo test
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
- name: Coverage
uses: actions-rs/grcov@v0.1
with:
config: .github/grcov.yml
- name: Upload Results
uses: codecov/codecov-action@v2
integration_tests:
runs-on: ubuntu-latest
strategy:

View File

@ -4,6 +4,7 @@
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/containers/youki)](https://github.com/containers/youki/graphs/commit-activity)
[![GitHub contributors](https://img.shields.io/github/contributors/containers/youki)](https://github.com/containers/youki/graphs/contributors)
[![Github CI](https://github.com/containers/youki/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/containers/youki/actions)
[![codecov](https://codecov.io/gh/containers/youki/branch/main/graph/badge.svg)](https://codecov.io/gh/containers/youki)
<p align="center">
<img src="docs/youki.png" width="230" height="230">