mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2026-03-21 20:34:07 +00:00
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Coverage
|
|
|
|
on: [pull_request, push]
|
|
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
CARGO_NET_RETRY: 10
|
|
CI: 1
|
|
RUST_BACKTRACE: short
|
|
RUSTUP_MAX_RETRIES: 10
|
|
|
|
jobs:
|
|
coverage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
run: |
|
|
rustup update --no-self-update nightly
|
|
rustup default nightly
|
|
rustup component add --toolchain nightly rust-src rustc-dev rustfmt
|
|
# We also install a nightly rustfmt, because we use `--file-lines` in
|
|
# a test.
|
|
rustup toolchain install nightly --profile minimal --component rustfmt
|
|
|
|
rustup toolchain install nightly --component llvm-tools-preview
|
|
|
|
- name: Install cargo-llvm-cov
|
|
uses: taiki-e/install-action@cargo-llvm-cov
|
|
|
|
- name: Install nextest
|
|
uses: taiki-e/install-action@nextest
|
|
|
|
- name: Generate code coverage
|
|
run: cargo llvm-cov --workspace --lcov --output-path lcov.info
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
files: lcov.info
|
|
fail_ci_if_error: false
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
verbose: true
|