mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2026-03-24 12:56:59 +00:00
[PR #1263] [MERGED] Code coverage for Rust #4631
Labels
No labels
2024
2025
2026
acct mgmt
AI
automation
bug
calendar
ci
CJK
cloud
code-block
collaboration
copy-paste
database
data migration
data sync
deploy
desktop
develop
develop
documentation
duplicate
editor
editor-plugin
emoji
export
files
flutter-only
follow-up
formula
good first issue for devs
good first issue for experienced devs
grid
hacktoberfest
HACKTOBERFEST-ACCEPTED
help wanted
i18n
icons
images
importer
improvements
infra
install
integrations
IR
kanban board
login
look and joy
mentorship
mobile
mobile
needs design
new feature
new feature
non-coding
notes
notifications
onboarding
organization
P0+
permission
platform-linux
platform-mac
platform-windows
plugins
program
pull-request
Q1 25
Q1 26
Q2 24
Q2 25
Q3 24
Q3 25
Q4 24
Q4 25
react
regression
rust
rust
Rust-only
Rust-only
Rust-starter
Rust-starter
self-hosted
shortcuts
side panel
slash-menu
sync v2
table
tablet
task
tauri
templates
tests
themes
translation
v0.5.6
v0.5.8
v0.5.9
v0.6.0
v0.6.1
v0.6.4
v0.6.7
v0.6.8
v0.7.1
v0.7.4
v0.7.4
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.8.0
v0.8.4
v0.8.5
v0.8.9
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AppFlowy-IO/AppFlowy#4631
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/1263
Author: @SwapnilKumbhar
Created: 10/10/2022
Status: ✅ Merged
Merged: 10/11/2022
Merged by: @appflowy
Base:
main← Head:main📝 Commits (10+)
2d6e96dfeat: Bumped Rust to stable-2022-04-07 (1.60.0)e70e1f6feat: Added coverage tests and report generation6a48f9bfeat: Added workflow for Rust Coverage004d63afeat: Bumped Rust to 1.60.0 in Workflows049a7b1test: Testing for CI7a4a237ci: Added name and fixed path for Rust Coverage40dde2crevert: "test: Testing for CI"5113743fix: Added .pub-cache to PATH, change incremental builds to zerod6f5c34test: Testing for CI2cddad3ci: Installing protobuf compiler in CI📊 Changes
11 files changed (+282 additions, -11 deletions)
View changed files
📝
.github/workflows/ci.yaml(+1 -1)📝
.github/workflows/dart_lint.yml(+1 -1)📝
.github/workflows/dart_test.yml(+1 -1)📝
.github/workflows/release.yml(+3 -3)➕
.github/workflows/rust_coverage.yml(+71 -0)📝
.github/workflows/rust_lint.yml(+1 -1)📝
.github/workflows/rust_test.yml(+2 -2)➕
frontend/rust-lib/covtest.rs(+0 -0)📝
frontend/rust-lib/rust-toolchain.toml(+1 -1)📝
frontend/scripts/makefile/tests.toml(+200 -0)📝
shared-lib/rust-toolchain.toml(+1 -1)📄 Description
Implements #1169.
Summary of changes
rustcto2022-04-07, that is version1.60.0as that version introduces coverage instrumentation. These bumps are in therust-toolchain.tomlfiles in the projects and also in the CI workflow files.frontend/scripts/makefile/tests.toml, created twocargo maketasks (among other supporting ones):get_test_coverage- Tests both projects with-C instrument-coverageflag withrustc. Further, runsgrcovto create an HTML report of the total coverage. The report is stored in each project's directory undertarget/coverage-html/, main HTML file beingindex.html.get_ci_test_coverage- Tests the same way as above, but generateslcovtest reports instead of human readable HTML. These can be integrated in CI using various actions on the Github Marketplace. Each project will have a file calledtarget/coverage.lcovthat will contain the coverage data.rust-coverage.ymlworkflow that runs theget_ci_test_coveragetask. This is intended to give a test report for each pull-request and push tomain. I need some direction on what Github action should be used to display that.Further help
This PR will give coverage capabilities, however they are not visible in the Github CI. There are multiple Github actions on the marketplace that will solve this problem if we just point them to the test coverage
lcovfile. I hope you can tell me what would be the best way to go here. Here's a list of actions that I found on the internet -Note
You may see a lot of commits being made and reverted in the history. I mostly did those to trigger the CI.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.