ci: codecov and badges (#30)
* ci: codecov and badges * Add missing waku tests to codecov * Reverted binary copies; running ignored tests for coverage
This commit is contained in:
parent
aa06fcc969
commit
b26eb9b22e
|
@ -0,0 +1,43 @@
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
name: Codecov
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: -C instrument-coverage
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Checkout submodules
|
||||||
|
run: git submodule update --init --recursive
|
||||||
|
- uses: actions/setup-go@v3 # we need go to build go-waku
|
||||||
|
with:
|
||||||
|
go-version: '1.19'
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
components: llvm-tools-preview
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
continue-on-error: true
|
||||||
|
- run: |
|
||||||
|
cargo install grcov;
|
||||||
|
cargo test --all-features -- --ignored;
|
||||||
|
mkdir /tmp/cov;
|
||||||
|
grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o /tmp/cov/tests.lcov;
|
||||||
|
- uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
directory: /tmp/cov/
|
||||||
|
name: waku-bindings-codecov
|
||||||
|
fail_ci_if_error: true
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ on:
|
||||||
tags:
|
tags:
|
||||||
- v*.*.*
|
- v*.*.*
|
||||||
|
|
||||||
name: CI
|
name: Release
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
@ -15,4 +15,4 @@ jobs:
|
||||||
override: true
|
override: true
|
||||||
- uses: katyo/publish-crates@v1
|
- uses: katyo/publish-crates@v1
|
||||||
with:
|
with:
|
||||||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||||
|
|
16
README.md
16
README.md
|
@ -1,5 +1,19 @@
|
||||||
# Waku Rust bindings
|
# Waku Rust bindings
|
||||||
|
|
||||||
|
[![Crates.io][crates-badge]][crates-url]
|
||||||
|
[![Documentation][docs-badge]][docs-url]
|
||||||
|
[![Build Status][actions-badge]][actions-url]
|
||||||
|
[![Codecov Status][codecov-badge]][codecov-url]
|
||||||
|
|
||||||
|
[crates-badge]: https://img.shields.io/crates/v/waku-bindings.svg
|
||||||
|
[crates-url]: https://crates.io/crates/waku-bindings
|
||||||
|
[docs-badge]: https://docs.rs/waku-bindings/badge.svg
|
||||||
|
[docs-url]: https://docs.rs/waku-bindings
|
||||||
|
[actions-badge]: https://github.com/waku-org/waku-rust-bindings/workflows/CI/badge.svg
|
||||||
|
[actions-url]: https://github.com/waku-org/waku-rust-bindings/actions/workflows/main.yml?query=workflow%3ACI+branch%3Amaster
|
||||||
|
[codecov-badge]: https://codecov.io/github/waku-org/waku-rust-bindings/branch/main/graph/badge.svg?token=H4CQWRUCUS
|
||||||
|
[codecov-url]: https://codecov.io/github/waku-org/waku-rust-bindings
|
||||||
|
|
||||||
Rust layer on top of [`go-waku`](https://github.com/status-im/go-waku) [c ffi bindings](https://github.com/status-im/go-waku/blob/v0.2.2/library/README.md).
|
Rust layer on top of [`go-waku`](https://github.com/status-im/go-waku) [c ffi bindings](https://github.com/status-im/go-waku/blob/v0.2.2/library/README.md).
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,4 +46,4 @@ This makes it ideal for running a p2p protocol on mobile, or in other similarly
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Read the [Waku docs](https://docs.wakuconnect.dev/)
|
Read the [Waku docs](https://docs.wakuconnect.dev/)
|
||||||
|
|
Loading…
Reference in New Issue