Skip to content

coverage

coverage #1867

Workflow file for this run

# Copyright 2023 The CeresDB Authors
#
# Licensed 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: coverage
on:
workflow_dispatch:
pull_request:
paths-ignore:
- 'docs/**'
- 'etc/**'
- '**.md'
- '.dockerignore'
- 'docker/**'
schedule:
- cron: '14 1/3 * * *'
# Common environment variables
env:
RUSTFLAGS: "-C debuginfo=1"
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "1"
RUST_VERSION: nightly-2023-02-02
jobs:
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ env.RUST_VERSION }}
- name: Release Disk Quota
run: |
sudo rm -rf /usr/local/lib/android # release about 10 GB
sudo rm -rf /usr/share/dotnet # release about 20GB
- name: Ensure Disk Quota
run: |
make ensure-disk-quota
- name: Setup Build Environment
run: |
sudo apt update
sudo apt install --yes protobuf-compiler
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov --version=0.5.9
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Report coverage
continue-on-error: true
run: bash <(curl -s https://codecov.io/bash)