feat(ci): add code coverage (#36)

This commit is contained in:
Hubert
2024-10-07 17:18:13 +02:00
committed by GitHub
parent 7840b338f8
commit 3c314f10af
2 changed files with 36 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
name: Code coverage
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: "${{ github.ref != 'refs/heads/main' }}"
"on":
workflow_dispatch:
merge_group:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
codedov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@cargo-llvm-cov
- run: cargo llvm-cov --all-features --lcov --output-path lcov.info
env:
RUSTC_WRAPPER:
- uses: actions/upload-artifact@v4
with:
name: lcov.info
path: lcov.info
if-no-files-found: error
- name: Upload to codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -f lcov.info -Z
+1
View File
@@ -2,6 +2,7 @@
[![Rust](https://github.com/LesnyRumcajs/wakey/actions/workflows/rust.yml/badge.svg)](https://github.com/LesnyRumcajs/wakey/actions/workflows/rust.yml)
[![Crates.io](https://img.shields.io/crates/v/wakey.svg)](https://crates.io/crates/wakey)
[![docs.rs](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/wakey)
[![codecov](https://codecov.io/github/LesnyRumcajs/wakey/graph/badge.svg?token=PXR2yHWzvJ)](https://codecov.io/github/LesnyRumcajs/wakey)
Library for managing Wake-on-LAN packets. It supports:
* creating magic packets,