name: Tests
on:
push:
branches:
- main
- master
- release/*
paths-ignore:
- "**/*.md"
pull_request:
branches:
- main
- master
- release/*
paths-ignore:
- "**/*.md"
permissions: write-all
jobs:
run_tests:
if: ${{ !(startsWith(github.head_ref, 'chore/') || startsWith(github.head_ref, 'ci/') || startsWith(github.head_ref, 'docs/')) }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
toolchain:
- stable
steps:
- name: Disable SSL Verify
run: git config --global http.sslVerify false
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt
- name: Build
run: |
cargo build --locked --verbose
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Coverage
run: |
cargo llvm-cov --workspace --lcov --output-path lcov.info --quiet
cargo llvm-cov report
- name: Upload coverage artifact
uses: actions/upload-artifact@v4.6.2
with:
name: lcov.info
path: lcov.info
if-no-files-found: ignore
retention-days: 7