This commit is contained in:
Yuki Okushi 2026-07-03 23:10:51 +00:00 committed by GitHub
commit 7ac7cf73b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 21 additions and 24 deletions

View File

@ -21,7 +21,7 @@ workflows:
'.github/workflows/coverage.yml':
- 'actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6'
- 'actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0'
- 'codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f'
- 'actions/upload-code-coverage@82c7aee3fb2ad768e00b00a0a8d749c5815085b6'
- 'taiki-e/install-action@9e1e5806d4a4822de933115878265be9aaa786d9'
'.github/workflows/labeler.yml':
- 'actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0'
@ -55,23 +55,16 @@ dependencies:
commit: 'sha1-9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0'
owner_id: 44036562
repo_id: 197814629
'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd':
ref: 'v8.0.0'
commit: 'sha1-ed597411d8f924073f98dfc5c65a23a2325f34cd'
owner_id: 44036562
repo_id: 205262760
'actions/labeler@f27b608878404679385c85cfa523b85ccb86e213':
ref: 'v6.1.0'
commit: 'sha1-f27b608878404679385c85cfa523b85ccb86e213'
owner_id: 44036562
repo_id: 177139928
'codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f':
ref: 'v7.0.0'
commit: 'sha1-fb8b3582c8e4def4969c97caa2f19720cb33a72f'
owner_id: 8226205
repo_id: 200299178
uses:
- 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd'
'actions/upload-code-coverage@82c7aee3fb2ad768e00b00a0a8d749c5815085b6':
ref: 'v1.3.0'
commit: 'sha1-82c7aee3fb2ad768e00b00a0a8d749c5815085b6'
owner_id: 44036562
repo_id: 1220171870
'embarkstudios/cargo-deny-action@bb137d7af7e4fb67e5f82a49c4fce4fad40782fe':
ref: 'v2.0.20'
commit: 'sha1-bb137d7af7e4fb67e5f82a49c4fce4fad40782fe'

View File

@ -5,9 +5,13 @@ name: Coverage
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
code-quality: write
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@ -33,12 +37,12 @@ jobs:
tool: just,cargo-llvm-cov,cargo-nextest
- name: Generate code coverage
run: just test-coverage-codecov
run: just test-coverage-cobertura
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
- name: Upload coverage to GitHub
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: actions/upload-code-coverage@82c7aee3fb2ad768e00b00a0a8d749c5815085b6 # v1.3.0
with:
files: codecov.json
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
file: cobertura.xml
language: Rust
label: code-coverage/cargo-llvm-cov

View File

@ -14,7 +14,7 @@
[![Dependency Status](https://deps.rs/crate/actix-web/4.14.0/status.svg)](https://deps.rs/crate/actix-web/4.14.0)
<br />
[![CI](https://github.com/actix/actix-web/actions/workflows/ci.yml/badge.svg)](https://github.com/actix/actix-web/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/actix/actix-web/graph/badge.svg?token=dSwOnp9QCv)](https://codecov.io/gh/actix/actix-web)
[![Coverage](https://github.com/actix/actix-web/actions/workflows/coverage.yml/badge.svg)](https://github.com/actix/actix-web/actions/workflows/coverage.yml)
![downloads](https://img.shields.io/crates/d/actix-web.svg)
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)

View File

@ -73,9 +73,9 @@ test-coverage:
cargo {{ toolchain }} llvm-cov nextest --no-tests=warn --no-report {{ all_crate_features }}
cargo {{ toolchain }} llvm-cov --doc --no-report {{ all_crate_features }}
# Test workspace and generate Codecov report.
test-coverage-codecov: test-coverage
cargo {{ toolchain }} llvm-cov report --doctests --codecov --output-path=codecov.json
# Test workspace and generate Cobertura report.
test-coverage-cobertura: test-coverage
cargo {{ toolchain }} llvm-cov report --doctests --cobertura --output-path=cobertura.xml
# Test workspace and generate LCOV report.
test-coverage-lcov: test-coverage