Add code coverage using coveralls and tarpaulin (#413)

This commit is contained in:
Flori 2023-08-25 21:20:21 +02:00 committed by GitHub
commit e837dc07c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -13,6 +13,7 @@ jobs:
rust:
runs-on: ubuntu-latest
environment: CI
steps:
- uses: actions/checkout@v3
@ -31,7 +32,7 @@ jobs:
npm run start &
working-directory: ./server
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build, Test and Publish Coverage
run: |
cargo install cargo-tarpaulin
cargo tarpaulin --all-features --verbose --skip-clean --coveralls ${{ secrets.COVERALLS_REPO_TOKEN }} --timeout 120

View File

@ -2,6 +2,7 @@
[![Discord]][Discord-invite]
[![Build][build-shield]][build-url]
[![Coverage][coverage-shield]][coverage-url]
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Issues][issues-shield]][issues-url]
@ -124,6 +125,8 @@ accepted, if it violates these guidelines or [our Code of Conduct](https://githu
[clippy-url]: https://github.com/polyphony-chat/chorus/blob/main/.github/workflows/clippy.yml
[contributors-shield]: https://img.shields.io/github/contributors/polyphony-chat/chorus.svg?style=flat
[contributors-url]: https://github.com/polyphony-chat/chorus/graphs/contributors
[coverage-shield]: https://coveralls.io/repos/github/polyphony-chat/chorus/badge.svg?branch=main
[coverage-url]: https://coveralls.io/github/polyphony-chat/chorus?branch=main
[forks-shield]: https://img.shields.io/github/forks/polyphony-chat/chorus.svg?style=flat
[forks-url]: https://github.com/polyphony-chat/chorus/network/members
[stars-shield]: https://img.shields.io/github/stars/polyphony-chat/chorus.svg?style=flat