name: Coverage
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
schedule:
- cron: '41 5 * * 1'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd with:
persist-credentials: false
- name: Clone kimi-wire dependency
run: git clone --depth=1 https://github.com/ekhodzitsky/kimi-wire.git ../kimi-wire
- name: Install Rust
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
with:
toolchain: stable
components: llvm-tools-preview
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@e0eafa9a0d485c37f97c0f7beb930a58a2facbac with:
tool: cargo-llvm-cov
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run coverage
run: cargo llvm-cov --codecov --output-path codecov.json
- name: Upload to Codecov
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574
with:
files: ./codecov.json
disable_search: true
fail_ci_if_error: false