mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
refactor: crates (#4258)
* chore: rename flowy-folder2 to flowy-folder * chore: rename flowy-document2 to flowy-document * chore: fix test * chore: move lib-infra crate * chore: remove shared-lib * chore: fix clippy
This commit is contained in:
@ -80,13 +80,6 @@ cd rust-lib
|
||||
RUST_LOG=info RUST_BACKTRACE=1 cargo test --no-default-features --features "rev-sqlite"
|
||||
'''
|
||||
|
||||
[tasks.shared_lib_unit_test]
|
||||
env = { RUST_LOG = "info" }
|
||||
description = "Run shared-lib unit test"
|
||||
script = '''
|
||||
cd ../shared-lib
|
||||
cargo test --no-default-features
|
||||
'''
|
||||
|
||||
[tasks.check_grcov]
|
||||
description = "Check if `grcov` is installled"
|
||||
@ -115,7 +108,7 @@ script = ["""
|
||||
rm ${full_path}
|
||||
end
|
||||
|
||||
shared_lib_profs = glob_array ../shared-lib/**/*.profraw
|
||||
shared_lib_profs = glob_array ./rust-lib/build-tool/**/*.profraw
|
||||
for prof in ${shared_lib_profs}
|
||||
full_path = canonicalize ${prof}
|
||||
rm ${full_path}
|
||||
@ -171,54 +164,12 @@ script = [
|
||||
""",
|
||||
]
|
||||
|
||||
[tasks.get_sharedlib_grcov_report]
|
||||
description = "Get `grcov` HTML report for test coverage shared-lib"
|
||||
script_runner = "@shell"
|
||||
script = [
|
||||
"""
|
||||
echo --- Getting 'grcov' results 'shared-lib' ---
|
||||
cd ../shared-lib
|
||||
|
||||
grcov . \
|
||||
--binary-path target/debug/deps \
|
||||
--source-dir . \
|
||||
--output-type html \
|
||||
--branch \
|
||||
--ignore-not-existing \
|
||||
--log-level WARN \
|
||||
--output-path target/coverage-html
|
||||
|
||||
echo "--- Done! Generated HTML report under 'target/coverage-html' for sharedlib."
|
||||
""",
|
||||
]
|
||||
|
||||
[tasks.get_grcov_report]
|
||||
description = "Get `grcov` HTML report for test coverage"
|
||||
run_task = { name = [
|
||||
"get_rustlib_grcov_report",
|
||||
"get_sharedlib_grcov_report",
|
||||
], parallel = true }
|
||||
|
||||
[tasks.get_sharedlib_lcov_report]
|
||||
description = "Generates `lcov` report for `shared-lib`"
|
||||
script_runner = "@shell"
|
||||
script = ["""
|
||||
echo Getting 'lcov' results for 'shared-lib'
|
||||
|
||||
cd ../shared-lib
|
||||
|
||||
grcov . \
|
||||
--binary-path target/debug/deps \
|
||||
--source-dir . \
|
||||
--output-type lcov \
|
||||
--branch \
|
||||
--ignore-not-existing \
|
||||
--log-level WARN \
|
||||
--output-path target/coverage.lcov
|
||||
|
||||
echo "--- Done! Generated 'target/coverage.lcov' sharedlib."
|
||||
"""]
|
||||
|
||||
[tasks.get_rustlib_lcov_report]
|
||||
description = "Generates `lcov` report for `rust-lib`"
|
||||
script_runner = "@shell"
|
||||
@ -242,7 +193,6 @@ script = ["""
|
||||
[tasks.get_lcov_report]
|
||||
description = "Get `lcov` reports for test coverage"
|
||||
run_task = { name = [
|
||||
"get_sharedlib_lcov_report",
|
||||
"get_rustlib_lcov_report",
|
||||
], parallel = true }
|
||||
|
||||
|
@ -11,7 +11,7 @@ script = ["""
|
||||
cd rust-lib
|
||||
cargo clean -q
|
||||
|
||||
cd ../../shared-lib
|
||||
cd ./build-tool
|
||||
cargo clean -q
|
||||
"""]
|
||||
script_runner = "@shell"
|
||||
@ -40,7 +40,7 @@ run_task = { name = "remove_files_with_pattern" }
|
||||
|
||||
[tasks.rm_shared_lib_generated_protobuf_files]
|
||||
private = true
|
||||
env = { "rm_proto_path" = "../shared-lib/**/resources/proto", "rm_protobuf_path" = "../shared-lib/**/protobuf" }
|
||||
env = { "rm_proto_path" = "./rust-lib/build-tool/**/resources/proto", "rm_protobuf_path" = "./rust-lib/build-tool/**/protobuf" }
|
||||
run_task = { name = "remove_files_with_pattern" }
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user