зеркало из
https://github.com/glebtv/tui-textarea.git
synced 2026-08-28 11:36:17 +03:00
measure and monitor coverage with codecov
Этот коммит содержится в:
7
.codecov.yaml
Обычный файл
7
.codecov.yaml
Обычный файл
@@ -0,0 +1,7 @@
|
|||||||
|
# https://docs.codecov.com/docs/commit-status#disabling-a-status
|
||||||
|
coverage:
|
||||||
|
status:
|
||||||
|
project: off
|
||||||
|
patch: off
|
||||||
|
|
||||||
|
comment: false
|
||||||
15
.github/workflows/ci.yml
поставляемый
15
.github/workflows/ci.yml
поставляемый
@@ -14,15 +14,26 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: cargo test --features=search,termwiz,termion,arbitrary
|
- name: Install cargo-llvm-cov
|
||||||
|
uses: taiki-e/install-action@cargo-llvm-cov
|
||||||
|
- name: Run tests on Linux or macOS
|
||||||
|
run: |
|
||||||
|
cargo llvm-cov --color always --lcov --output-path lcov.info --features=search,termwiz,termion,arbitrary
|
||||||
|
cargo llvm-cov --color always --no-run
|
||||||
if: ${{ matrix.os != 'windows-latest' }}
|
if: ${{ matrix.os != 'windows-latest' }}
|
||||||
- run: cargo test --features=search,termwiz,arbitrary
|
- name: Run tests on Windows
|
||||||
|
run: |
|
||||||
|
cargo llvm-cov --color always --lcov --output-path lcov.info --features=search,termwiz,arbitrary
|
||||||
|
cargo llvm-cov --color always --no-run
|
||||||
if: ${{ matrix.os == 'windows-latest' }}
|
if: ${{ matrix.os == 'windows-latest' }}
|
||||||
- run: cargo test --no-default-features --features=tuirs-crossterm,search -- --skip .rs
|
- run: cargo test --no-default-features --features=tuirs-crossterm,search -- --skip .rs
|
||||||
- run: cargo test --no-default-features --features=tuirs-termion,search -- --skip .rs
|
- run: cargo test --no-default-features --features=tuirs-termion,search -- --skip .rs
|
||||||
if: ${{ matrix.os != 'windows-latest' }}
|
if: ${{ matrix.os != 'windows-latest' }}
|
||||||
- run: cargo test --no-default-features --features=no-backend,search -- --skip .rs
|
- run: cargo test --no-default-features --features=no-backend,search -- --skip .rs
|
||||||
- run: cargo test --no-default-features --features=tuirs-no-backend,search -- --skip .rs
|
- run: cargo test --no-default-features --features=tuirs-no-backend,search -- --skip .rs
|
||||||
|
- uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
files: lcov.info
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -38,6 +38,14 @@ Note: On Windows, remove `termion` and `tuirs-termion` features from `--features
|
|||||||
If you use [cargo-watch][], `cargo watch-check` and `cargo watch-test` aliases are useful to run checks/tests automatically
|
If you use [cargo-watch][], `cargo watch-check` and `cargo watch-test` aliases are useful to run checks/tests automatically
|
||||||
on files being changed.
|
on files being changed.
|
||||||
|
|
||||||
|
### Code coverage
|
||||||
|
|
||||||
|
Code coverage is monitored on [codecov][].
|
||||||
|
|
||||||
|
https://app.codecov.io/gh/rhysd/tui-textarea
|
||||||
|
|
||||||
|
When you implement some new feature, consider to add new unit tests which cover your implementation.
|
||||||
|
|
||||||
## Print debugging
|
## Print debugging
|
||||||
|
|
||||||
Since this crate uses stdout, `println!` is not available for debugging. Instead, stderr through [`eprintln!`][eprintln]
|
Since this crate uses stdout, `println!` is not available for debugging. Instead, stderr through [`eprintln!`][eprintln]
|
||||||
@@ -99,3 +107,4 @@ See [README in bench/](./bench/README.md) for more details.
|
|||||||
[criterion]: https://github.com/bheisler/criterion.rs
|
[criterion]: https://github.com/bheisler/criterion.rs
|
||||||
[eprintln]: https://doc.rust-lang.org/std/macro.eprintln.html
|
[eprintln]: https://doc.rust-lang.org/std/macro.eprintln.html
|
||||||
[dbg]: https://doc.rust-lang.org/std/macro.dbg.html
|
[dbg]: https://doc.rust-lang.org/std/macro.dbg.html
|
||||||
|
[codecov]: https://about.codecov.io/
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ tui-textarea
|
|||||||
[![crate][crates-io-badge]][crate]
|
[![crate][crates-io-badge]][crate]
|
||||||
[![docs][doc-badge]][doc]
|
[![docs][doc-badge]][doc]
|
||||||
[![CI][ci-badge]][ci]
|
[![CI][ci-badge]][ci]
|
||||||
|
[![coverage][codecov-badge]][codecov]
|
||||||
|
|
||||||
[tui-textarea][crate] is a simple yet powerful text editor widget like `<textarea>` in HTML for [ratatui][] and [tui-rs][].
|
[tui-textarea][crate] is a simple yet powerful text editor widget like `<textarea>` in HTML for [ratatui][] and [tui-rs][].
|
||||||
Multi-line text editor can be easily put as part of your TUI application.
|
Multi-line text editor can be easily put as part of your TUI application.
|
||||||
@@ -712,6 +713,8 @@ tui-textarea is distributed under [The MIT License](./LICENSE.txt).
|
|||||||
[doc]: https://docs.rs/tui-textarea/latest/tui_textarea/
|
[doc]: https://docs.rs/tui-textarea/latest/tui_textarea/
|
||||||
[ci-badge]: https://github.com/rhysd/tui-textarea/actions/workflows/ci.yml/badge.svg?event=push
|
[ci-badge]: https://github.com/rhysd/tui-textarea/actions/workflows/ci.yml/badge.svg?event=push
|
||||||
[ci]: https://github.com/rhysd/tui-textarea/actions/workflows/ci.yml
|
[ci]: https://github.com/rhysd/tui-textarea/actions/workflows/ci.yml
|
||||||
|
[codecov-badge]: https://codecov.io/gh/rhysd/tui-textarea/graph/badge.svg?token=YAA3EVRXAY
|
||||||
|
[codecov]: https://codecov.io/gh/rhysd/tui-textarea
|
||||||
[tui-rs]: https://github.com/fdehau/tui-rs
|
[tui-rs]: https://github.com/fdehau/tui-rs
|
||||||
[ratatui]: https://github.com/ratatui-org/ratatui
|
[ratatui]: https://github.com/ratatui-org/ratatui
|
||||||
[crossterm]: https://docs.rs/crossterm/latest/crossterm/
|
[crossterm]: https://docs.rs/crossterm/latest/crossterm/
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user