diff --git a/.taskcluster.yml b/.taskcluster.yml index b611f4fef..aafb8ec79 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -58,6 +58,39 @@ tasks: owner: cdenizet@mozilla.com source: ${repository}/raw/${head_rev}/.taskcluster.yml + - taskId: {$eval: as_slugid("grcov_test_task")} + created: {$fromNow: ''} + deadline: {$fromNow: '1 hour'} + provisionerId: proj-relman + workerType: ci + payload: + maxRunTime: 3600 + image: "rust:buster" + env: + CODECOV_TOKEN: 4df01912-087e-489a-be28-25aa911cb9d2 + CARGO_INCREMENTAL: 0 + RUSTFLAGS: -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads + command: + - "/bin/bash" + - "-cx" + - "apt-get -qq update && + apt-get -qq install -y zip && + rustup toolchain install nightly && + rustup default nightly && + curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-linux-x86_64.tar.bz2 | tar jxf - && + git clone --recursive --quiet ${repository} && + cd rust-code-analysis && + git -c advice.detachedHead=false checkout ${head_rev} && + cargo test && + zip -0 ccov.zip `find . -name 'rust_code_analysis*.gc*' -print` && + ../grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore '/*' -o lcov.info && + bash <(curl -s https://codecov.io/bash) -f lcov.info" + metadata: + name: rust-code-analysis grcov test + description: rust-code-analysis grcov test + owner: cdenizet@mozilla.com + source: ${repository}/raw/${head_rev}/.taskcluster.yml + - taskId: {$eval: as_slugid("windows_test_task")} created: {$fromNow: ''} deadline: {$fromNow: '1 hour'} diff --git a/README.md b/README.md index f1f55a8d0..d71ea8890 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # rust-code-analysis [![Task Status](https://community-tc.services.mozilla.com/api/github/v1/repository/mozilla/rust-code-analysis/master/badge.svg)](https://community-tc.services.mozilla.com/api/github/v1/repository/mozilla/rust-code-analysis/master/latest) +[![codecov](https://codecov.io/gh/mozilla/rust-code-analysis/branch/master/graph/badge.svg)](https://codecov.io/gh/mozilla/rust-code-analysis) This project is a Rust crate (library) to analyse source code. This software is based on [Tree Sitter](https://github.com/tree-sitter/tree-sitter).