mirror of https://github.com/fafhrd91/actix-web
chore: migrate to GitHub-builtin coverage
This commit is contained in:
parent
1fc14e3072
commit
1cc0e4d532
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
[](https://deps.rs/crate/actix-web/4.14.0)
|
||||
<br />
|
||||
[](https://github.com/actix/actix-web/actions/workflows/ci.yml)
|
||||
[](https://codecov.io/gh/actix/actix-web)
|
||||
[](https://github.com/actix/actix-web/actions/workflows/coverage.yml)
|
||||

|
||||
[](https://discord.gg/NWpN5mmg3x)
|
||||
|
||||
|
|
|
|||
6
justfile
6
justfile
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue