Skip to content

update Changelog

update Changelog #135

Workflow file for this run

name: CI
on:
push:
branches: ["main", "master"]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# πŸ‘‡ Free up disk space before building
- name: Free disk space (optional but helpful)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
large-packages: true
docker-images: true
swap-storage: true
# πŸ‘‡ Install dependencies
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
# πŸ‘‡ Install Rust toolchain
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
# πŸ‘‡ Install cargo-llvm-cov for test coverage
- name: Install cargo-llvm-cov
run: |
cargo install cargo-llvm-cov
# πŸ‘‡ Cache Cargo dependencies (registry + git index)
- name: Cache Cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
# πŸ‘‡ Run tests with coverage instrumentation
- name: Run tests with coverage
run: |
set -euxo pipefail
cargo llvm-cov clean --workspace
cargo llvm-cov --workspace --lcov --output-path lcov.info
cargo llvm-cov report --summary-only
# πŸ‘‡ Upload HTML coverage report as artifact
- name: Upload HTML coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-html
path: target/llvm-cov/html
# πŸ‘‡ Clean up disk after tests
- name: Cleanup
if: always()
run: |
rm -rf target
df -h