Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Setup Rust caching
uses: Swatinem/rust-cache@v2

- name: Check formatting
run: cargo fmt -- --check

- name: Run clippy
run: cargo clippy -- -D warnings

- name: Run tests
run: cargo test -- --test-threads=1

- name: Build release
run: cargo build --release

coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install tarpaulin
run: cargo install cargo-tarpaulin
Comment on lines +46 to +47
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing cargo-tarpaulin on every coverage run is time-consuming. Consider either using a Docker image with tarpaulin pre-installed, caching the installation, or using the latest actions/cache for the cargo bin directory. Alternatively, consider using cargo-llvm-cov which is generally faster and more actively maintained.

Suggested change
- name: Install tarpaulin
run: cargo install cargo-tarpaulin
- name: Cache cargo bin (tarpaulin)
id: cache-tarpaulin
uses: actions/cache@v4
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-bin-tarpaulin
- name: Install tarpaulin
if: steps.cache-tarpaulin.outputs.cache-hit != 'true'
run: cargo install cargo-tarpaulin --locked

Copilot uses AI. Check for mistakes.

- name: Generate coverage
run: cargo tarpaulin --out Xml --timeout 300 -- --test-threads=1

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow uses codecov/codecov-action@v3, but v4 is available and recommended as of late 2023. Consider updating to v4 which includes improvements to upload reliability and tokenless uploads for public repositories. Note that v4 may require explicit token configuration for private repositories.

Suggested change
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4

Copilot uses AI. Check for mistakes.
with:
files: ./cobertura.xml
fail_ci_if_error: false
Loading