Skip to content

Don't upload coverage when publishing #340

Don't upload coverage when publishing

Don't upload coverage when publishing #340

Workflow file for this run

name: Rust Unit Tests
on:
workflow_call:
inputs:
upload_coverage:
description: 'Whether to upload coverage report to Codecov'

Check failure on line 7 in .github/workflows/unit-test.yml

View workflow run for this annotation

GitHub Actions / Rust Unit Tests

Invalid workflow file

The workflow is not valid. .github/workflows/unit-test.yml (Line: 7, Col: 9): Required property is missing: type
required: false
default: 'true'
push: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Rust
run: |
rustup toolchain install stable
rustup default stable
rustup component add llvm-tools-preview
- name: Install code coverage tool
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run tests
run: cargo llvm-cov
- name: Generate coverage report
run: cargo llvm-cov report --lcov --output-path target/lcov.info
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
if: ${{ inputs.upload_coverage == 'true' }}
with:
fail_ci_if_error: true
files: ./target/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}