Skip to content

Commit

Permalink
test(ci): add coverage (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Nov 3, 2024
1 parent 79bfca9 commit c6ee3b1
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,24 @@ jobs:
cargo set-version ${{ needs.setup_release.outputs.release_version }}
- name: Test
id: test
uses: ./ci/github-actions/arch-run
with:
command: cargo test
command: cargo install cargo-tarpaulin; cargo tarpaulin --engine llvm --out Xml

- name: Upload coverage
# any except canceled or skipped
if: >-
always() &&
(steps.test.outcome == 'success' || steps.test.outcome == 'failure') &&
startsWith(github.repository, 'LizardByte/')
uses: codecov/codecov-action@v4
with:
disable_search: true
fail_ci_if_error: true
files: cobertura.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

- name: Clippy
uses: ./ci/github-actions/arch-run
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![GitHub stars](https://img.shields.io/github/stars/lizardbyte/pacman-repo-builder.svg?logo=github&style=for-the-badge)](https://github.com/LizardByte/pacman-repo-builder)
[![GitHub Releases](https://img.shields.io/github/downloads/lizardbyte/pacman-repo-builder/total.svg?style=for-the-badge&logo=github)](https://github.com/LizardByte/pacman-repo-builder/releases/latest)
[![GitHub Workflow Status (CI)](https://img.shields.io/github/actions/workflow/status/lizardbyte/pacman-repo-builder/ci.yml.svg?branch=master&label=CI%20build&logo=github&style=for-the-badge)](https://github.com/LizardByte/pacman-repo-builder/actions/workflows/ci.yml?query=branch%3Amaster)
[![Codecov](https://img.shields.io/codecov/c/gh/LizardByte/pacman-repo-builder?token=HZPhTVKYKt&style=for-the-badge&logo=codecov&label=codecov)](https://codecov.io/gh/LizardByte/pacman-repo-builder)

Build a custom pacman repository from a collection of PKGBUILD directories.

Expand Down
19 changes: 19 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
codecov:
branch: master

coverage:
status:
project:
default:
target: auto
threshold: 10%

comment:
layout: "diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes

ignore:
- "tests"
- "third-party"

0 comments on commit c6ee3b1

Please sign in to comment.