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:
runs-on: ${{ matrix.os }}
if: ${{ !(startsWith(github.head_ref, 'chore/') || startsWith(github.head_ref, 'ci/') || startsWith(github.head_ref, 'docs/')) }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
steps:
- name: Disable SSL Verify
run: git config --global http.sslVerify false
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Rust Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1.16.0
- 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@v7
with:
name: lcov.info
path: lcov.info
if-no-files-found: ignore
retention-days: 7