mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-07 13:52:59 +00:00
* ci: Upgrade rust-cache to v2.2.0 v2.0.0 uses API that is deprecated * ci: Use --workspace in cargo llvm-cov * ci: Replace actions-rs/toolchain by dtolnay/rust-toolchain actions-rs/toolchain is under inactive maintenance, it uses node12 that would soon becomes deprecated * ci: Replace actions-rs/cargo by run * ci: rust-cache and cleanup-disk-action try not to specific full version * ci: Use nextest Also sets timeout for nextest to avoid a test hanging too long * ci: Upgrade actions/checkout to v3 To upgrade node from 12 to 16 * ci: Specific cleanup-disk-action version
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
push:
|
|
branches:
|
|
- "main"
|
|
- "develop"
|
|
workflow_dispatch:
|
|
|
|
name: Code coverage
|
|
|
|
env:
|
|
RUST_TOOLCHAIN: nightly-2022-07-14
|
|
|
|
jobs:
|
|
coverage:
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: arduino/setup-protoc@v1
|
|
- name: Install toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: ${{ env.RUST_TOOLCHAIN }}
|
|
components: llvm-tools-preview
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
- name: Cleanup disk
|
|
uses: curoky/cleanup-disk-action@v2.0
|
|
with:
|
|
retain: 'rust'
|
|
- name: Install latest nextest release
|
|
uses: taiki-e/install-action@nextest
|
|
- name: Install cargo-llvm-cov
|
|
uses: taiki-e/install-action@cargo-llvm-cov
|
|
- name: Collect coverage data
|
|
run: cargo llvm-cov nextest --workspace --lcov --output-path lcov.info
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
CARGO_INCREMENTAL: 0
|
|
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: Codecov upload
|
|
uses: codecov/codecov-action@v2
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
files: ./lcov.info
|
|
flags: rust
|
|
fail_ci_if_error: true
|
|
verbose: true
|