Skip to content

Commit

Permalink
build: added code coverage report (#248)
Browse files Browse the repository at this point in the history
Signed-off-by: blu3beri <[email protected]>
  • Loading branch information
berendsliedrecht authored Mar 10, 2023
1 parent c519c4e commit 67ed265
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 7 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Code Coverage

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
coverage:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update -y
- run: sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev -y

- uses: actions/checkout@v3

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: lcov.info
fail_ci_if_error: true
layout: "reach, diff, flags, files"
behavior: default
require_changes: false
require_base: no
require_head: yes
12 changes: 5 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features

- name: Clippy
run: cargo clippy

0 comments on commit 67ed265

Please sign in to comment.