chore: migrate to GitHub-builtin coverage

This commit is contained in:
Yuki Okushi 2026-07-04 08:10:37 +09:00
parent 82eed0ba1a
commit 2bd813ad98
4 changed files with 22 additions and 25 deletions

View File

@ -21,7 +21,7 @@ workflows:
'.github/workflows/coverage.yml': '.github/workflows/coverage.yml':
- 'actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659' - 'actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659'
- 'actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0' - 'actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0'
- 'codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f' - 'actions/upload-code-coverage@a72ab75b4dee0e479386fb9bf33c8dcf64b9c772'
- 'taiki-e/install-action@4684b8405694ae9dd42c9f39ba901a70ae83f4a3' - 'taiki-e/install-action@4684b8405694ae9dd42c9f39ba901a70ae83f4a3'
'.github/workflows/labeler.yml': '.github/workflows/labeler.yml':
- 'actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0' - 'actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0'
@ -55,23 +55,16 @@ dependencies:
commit: 'sha1-9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0' commit: 'sha1-9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0'
owner_id: 44036562 owner_id: 44036562
repo_id: 197814629 repo_id: 197814629
'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd':
ref: 'v8.0.0'
commit: 'sha1-ed597411d8f924073f98dfc5c65a23a2325f34cd'
owner_id: 44036562
repo_id: 205262760
'actions/labeler@b8dd2d9be0f68b860e7dae5dae7d772984eacd6d': 'actions/labeler@b8dd2d9be0f68b860e7dae5dae7d772984eacd6d':
ref: 'v6.2.0' ref: 'v6.2.0'
commit: 'sha1-b8dd2d9be0f68b860e7dae5dae7d772984eacd6d' commit: 'sha1-b8dd2d9be0f68b860e7dae5dae7d772984eacd6d'
owner_id: 44036562 owner_id: 44036562
repo_id: 177139928 repo_id: 177139928
'codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f': 'actions/upload-code-coverage@a72ab75b4dee0e479386fb9bf33c8dcf64b9c772':
ref: 'fb8b3582c8e4def4969c97caa2f19720cb33a72f' ref: 'v1.4.0'
commit: 'sha1-fb8b3582c8e4def4969c97caa2f19720cb33a72f' commit: 'sha1-a72ab75b4dee0e479386fb9bf33c8dcf64b9c772'
owner_id: 8226205 owner_id: 44036562
repo_id: 200299178 repo_id: 1220171870
uses:
- 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd'
'embarkstudios/cargo-deny-action@bb137d7af7e4fb67e5f82a49c4fce4fad40782fe': 'embarkstudios/cargo-deny-action@bb137d7af7e4fb67e5f82a49c4fce4fad40782fe':
ref: 'bb137d7af7e4fb67e5f82a49c4fce4fad40782fe' ref: 'bb137d7af7e4fb67e5f82a49c4fce4fad40782fe'
commit: 'sha1-bb137d7af7e4fb67e5f82a49c4fce4fad40782fe' commit: 'sha1-bb137d7af7e4fb67e5f82a49c4fce4fad40782fe'
@ -110,7 +103,7 @@ dependencies:
uses: uses:
- 'actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae' - 'actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae'
'taiki-e/install-action@4684b8405694ae9dd42c9f39ba901a70ae83f4a3': 'taiki-e/install-action@4684b8405694ae9dd42c9f39ba901a70ae83f4a3':
ref: 'v2.82.9' ref: '4684b8405694ae9dd42c9f39ba901a70ae83f4a3'
commit: 'sha1-4684b8405694ae9dd42c9f39ba901a70ae83f4a3' commit: 'sha1-4684b8405694ae9dd42c9f39ba901a70ae83f4a3'
owner_id: 43724913 owner_id: 43724913
repo_id: 442947557 repo_id: 442947557

View File

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

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) [![Dependency Status](https://deps.rs/crate/actix-web/4.14.0/status.svg)](https://deps.rs/crate/actix-web/4.14.0)
<br /> <br />
[![CI](https://github.com/actix/actix-web/actions/workflows/ci.yml/badge.svg)](https://github.com/actix/actix-web/actions/workflows/ci.yml) [![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) ![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) [![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 nextest --no-tests=warn --no-report {{ all_crate_features }}
cargo {{ toolchain }} llvm-cov --doc --no-report {{ all_crate_features }} cargo {{ toolchain }} llvm-cov --doc --no-report {{ all_crate_features }}
# Test workspace and generate Codecov report. # Test workspace and generate Cobertura report.
test-coverage-codecov: test-coverage test-coverage-cobertura: test-coverage
cargo {{ toolchain }} llvm-cov report --doctests --codecov --output-path=codecov.json cargo {{ toolchain }} llvm-cov report --doctests --cobertura --output-path=cobertura.xml
# Test workspace and generate LCOV report. # Test workspace and generate LCOV report.
test-coverage-lcov: test-coverage test-coverage-lcov: test-coverage