mirror of https://github.com/fafhrd91/actix-web
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
# This workflow is managed by gh actions-lock.
|
|
|
|
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 }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
coverage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install Rust (nightly)
|
|
uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1
|
|
with:
|
|
toolchain: nightly
|
|
components: llvm-tools
|
|
|
|
- name: Install just, cargo-llvm-cov, cargo-nextest
|
|
uses: taiki-e/install-action@9e1e5806d4a4822de933115878265be9aaa786d9 # v2.82.2
|
|
with:
|
|
tool: just,cargo-llvm-cov,cargo-nextest
|
|
|
|
- name: Generate code coverage
|
|
run: just test-coverage-cobertura
|
|
|
|
- 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:
|
|
file: cobertura.xml
|
|
language: Rust
|
|
label: code-coverage/cargo-llvm-cov
|