update CI
This commit is contained in:
@ -1,12 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import logging
|
||||
import argparse
|
||||
import webbrowser
|
||||
|
||||
|
||||
_LOGGER = logging.getLogger()
|
||||
|
||||
def generate_cov_report(open_report: bool):
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
os.environ["RUSTFLAGS"] = "-Cinstrument-coverage"
|
||||
os.environ["LLVM_PROFILE_FILE"] = "target/coverage/%p-%m.profraw"
|
||||
_LOGGER.info("Executing tests with coverage")
|
||||
os.system("cargo test")
|
||||
os.system(
|
||||
"grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing "
|
||||
@ -15,6 +20,7 @@ def generate_cov_report(open_report: bool):
|
||||
if open_report:
|
||||
coverage_report_path = os.path.abspath("./target/debug/coverage/index.html")
|
||||
webbrowser.open_new_tab(coverage_report_path)
|
||||
_LOGGER.info("Done")
|
||||
|
||||
|
||||
def main():
|
||||
|
Reference in New Issue
Block a user