Skip to content

Commit

Permalink
Merge pull request #4 from Finomnis/coverage
Browse files Browse the repository at this point in the history
Add code coverage reporting
  • Loading branch information
Finomnis committed Nov 21, 2021
2 parents e3f595e + 1a0b2ab commit b70f04c
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
# for simplicity we are compiling and testing everything on the Ubuntu environment only.
# For multi-OS testing see the `cross.yml` workflow.

on: [push, pull_request]

on:
pull_request:
branches: [main]
push:
branches: [main]

name: CI

Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Coverage
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: coverage-${{ github.ref }}
cancel-in-progress: true
jobs:
coverage:
name: Coverage
continue-on-error: true
runs-on: ubuntu-latest
env:
RUST_TEST_THREADS: "1"
steps:
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: llvm-tools-preview
override: true
- name: Checkout
uses: actions/checkout@v2
- name: Install llvm-cov
uses: actions-rs/install@v0.1
with:
crate: cargo-llvm-cov
version: 0.1.12
use-tool-cache: true
- name: Coverage
uses: actions-rs/cargo@v1
with:
command: llvm-cov
args: --all-features --workspace --lcov --output-path lcov.info
- name: Coveralls
uses: coverallsapp/github-action@master
with:
path-to-lcov: lcov.info
github-token: ${{ secrets.github_token }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](https://github.com/Finomnis/tokio-graceful-shutdown/blob/main/LICENSE)
[![Build Status](https://img.shields.io/github/workflow/status/Finomnis/tokio-graceful-shutdown/CI/main)](https://github.com/Finomnis/tokio-graceful-shutdown/actions/workflows/ci.yml?query=branch%3Amain)
[![docs.rs](https://img.shields.io/docsrs/tokio-graceful-shutdown)](https://docs.rs/tokio-graceful-shutdown)

[![Coverage Status](https://coveralls.io/repos/github/Finomnis/tokio-graceful-shutdown/badge.svg?branch=main)](https://coveralls.io/github/Finomnis/tokio-graceful-shutdown?branch=main)

This crate provides utility functions to perform a graceful shutdown on tokio-rs based services.

Expand Down

0 comments on commit b70f04c

Please sign in to comment.