Skip to content

Coverage

Coverage #3

Workflow file for this run

name: Coverage
on:
push:
branches:
- "main"
pull_request:
permissions:
id-token: write
jobs:
coverage:
if: github.event_name == 'pull_request' || github.repository == 'wasm-bindgen/wasm-bindgen'
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
# Pinned due to __llvm_profile_runtime regression in newer nightlies
RUSTUP_TOOLCHAIN: nightly-2026-02-18
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
with:
# Pinned due to __llvm_profile_runtime symbol removal in newer nightlies
toolchain: nightly-2026-02-18
targets: wasm32-unknown-unknown
- uses: taiki-e/install-action@just
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: Swatinem/rust-cache@v2
with:
key: cargo-codecov-${{ hashFiles('**/Cargo.toml') }}
- name: Generate code coverage
run: just cov --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
with:
use_oidc: true
fail_ci_if_error: true
files: lcov.info