mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-05 21:02:58 +00:00
* fix: set unittests dir to /tmp can explode grcov's disk Co-authored-by: luofucong <luofucong@greptime.com>
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
push:
|
|
branches:
|
|
- "main"
|
|
- "develop"
|
|
|
|
name: Code coverage
|
|
|
|
env:
|
|
RUST_TOOLCHAIN: nightly-2022-07-14
|
|
|
|
jobs:
|
|
grcov:
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: arduino/setup-protoc@v1
|
|
- name: Install toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ env.RUST_TOOLCHAIN }}
|
|
override: true
|
|
profile: minimal
|
|
- name: Cleanup disk
|
|
uses: curoky/cleanup-disk-action@v2.0
|
|
with:
|
|
retain: 'rust'
|
|
- name: Execute tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --workspace
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
CARGO_INCREMENTAL: 0
|
|
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=unwind -Zpanic_abort_tests"
|
|
GT_S3_BUCKET: ${{ secrets.S3_BUCKET }}
|
|
GT_S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
|
|
GT_S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
|
|
UNITTEST_LOG_DIR: "__unittest_logs"
|
|
- name: Gather coverage data
|
|
id: coverage
|
|
uses: actions-rs/grcov@v0.1
|
|
- name: Codecov upload
|
|
uses: codecov/codecov-action@v2
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
files: ./lcov.info
|
|
flags: rust
|
|
fail_ci_if_error: true
|
|
verbose: true
|