Apache DataFusion SQL Query Engine
ARROW-4189: [Rust] Added coverage report.
Jorge C. Leitao11cd13afebbf
diff --git a/.github/workflows/rust_cron.yml b/.github/workflows/rust_cron.ymlnew file mode 100644index 0000000000..378f2dd108--- /dev/null+++ b/.github/workflows/rust_cron.yml@@ -0,0 +1,56 @@+# Licensed to the Apache Software Foundation (ASF) under one+# or more contributor license agreements. See the NOTICE file+# distributed with this work for additional information+# regarding copyright ownership. The ASF licenses this file+# to you under the Apache License, Version 2.0 (the+# "License"); you may not use this file except in compliance+# with the License. You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing,+# software distributed under the License is distributed on an+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY+# KIND, either express or implied. See the License for the+# specific language governing permissions and limitations+# under the License.++name: Rust Cron++on:+ push:+ paths:+ - '.github/workflows/rust_cron.yml'+ pull_request:+ paths:+ - '.github/workflows/rust_cron.yml'+ schedule:+ - cron: 0 */12 * * *++jobs:+ coverage:+ name: AMD64 Debian 10 Rust ${{ matrix.rust }} Coverage+ runs-on: ubuntu-latest+ if: ${{ !contains(github.event.pull_request.title, 'WIP') && github.repository == 'apache/arrow' }}+ strategy:+ fail-fast: false+ matrix:+ rust: [nightly-2020-04-22]+ env:+ RUST: ${{ matrix.rust }}+ steps:+ - name: Checkout Arrow+ uses: actions/checkout@v2+ with:+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ run: ci/scripts/util_checkout.sh+ - name: Run coverage+ shell: bash+ run: |+ echo ${RUST} > rust/rust-toolchain &&+ ci/scripts/rust_coverage.sh `pwd` `pwd`/build $RUST+ - name: Report coverage+ continue-on-error: true+ shell: bash+ run: bash <(curl -s https://codecov.io/bash)diff --git a/ci/scripts/rust_coverage.sh b/ci/scripts/rust_coverage.shnew file mode 100755index 0000000000..fbe5b0d853--- /dev/null+++ b/ci/scripts/rust_coverage.sh@@ -0,0 +1,39 @@+#!/usr/bin/env bash+#+# Licensed to the Apache Software Foundation (ASF) under one+# or more contributor license agreements. See the NOTICE file+# distributed with this work for additional information+# regarding copyright ownership. The ASF licenses this file+# to you under the Apache License, Version 2.0 (the+# "License"); you may not use this file except in compliance+# with the License. You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing,+# software distributed under the License is distributed on an+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY+# KIND, either express or implied. See the License for the+# specific language governing permissions and limitations+# under the License.++set -ex++arrow_dir=${1}+source_dir=${1}/rust+build_dir=${2}/rust+rust=${3}++export ARROW_TEST_DATA=${arrow_dir}/testing/data+export PARQUET_TEST_DATA=${arrow_dir}/cpp/submodules/parquet-testing/data+export CARGO_TARGET_DIR=${build_dir}++pushd ${source_dir}++rustup default ${rust}+rustup component add rustfmt --toolchain ${rust}-x86_64-unknown-linux-gnu+cargo install cargo-tarpaulin++cargo tarpaulin --out Xml++popddiff --git a/rust/README.md b/rust/README.mdindex 9579bf6ec4..b228eadc34 100644--- a/rust/README.md+++ b/rust/README.md@@ -19,6 +19,8 @@# Native Rust implementation of Apache Arrow+[](https://codecov.io/gh/apache/arrow?branch=master)+## The Rust implementation of Arrow consists of the following crates| Crate | Description | Documentation |