Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-4189: [Rust] Added coverage report. #7797

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/rust_cron.yml
Original file line number Diff line number Diff line change
@@ -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)
39 changes: 39 additions & 0 deletions ci/scripts/rust_coverage.sh
Original file line number Diff line number Diff line change
@@ -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

popd
2 changes: 2 additions & 0 deletions rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

# Native Rust implementation of Apache Arrow

[![Coverage Status](https://codecov.io/gh/apache/arrow/rust/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/arrow?branch=master)

## The Rust implementation of Arrow consists of the following crates

| Crate | Description | Documentation |
Expand Down