Skip to content

fix(deps): update rust crate nr-auth to 0.0.6 #3272

fix(deps): update rust crate nr-auth to 0.0.6

fix(deps): update rust crate nr-auth to 0.0.6 #3272

permissions:
contents: read
on:
push:
branches: [ main ]
pull_request:
merge_group:
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: coverage
jobs:
coverage:
runs-on: ubuntu-latest
name: ubuntu / stable / coverage
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Obtain Rust version from project
run: |
RUST_VERSION=$(grep "rust-version" Cargo.toml | cut -d "=" -f2 | tr -d "[:space:]")
echo "RUST_VERSION=${RUST_VERSION}" >> $GITHUB_ENV
- name: Install Rust ${{ env.RUST_VERSION }}
uses: dtolnay/rust-toolchain@master
with:
components: llvm-tools-preview
toolchain: ${{ env.RUST_VERSION }}
- name: cargo install cargo-llvm-cov
uses: taiki-e/install-action@71765c00dd3e08a5484a5b9e82a4c88b86520e0e
# uses: taiki-e/install-action@cargo-llvm-cov
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-coverage
- name: Generate coverage report
run: COVERAGE_OUT_FORMAT=json COVERAGE_OUT_FILEPATH=jcov.info make coverage
- name: Calculate and print total coverage
run: |
echo "Total functions coverage: $(jq '.data[].totals.functions.percent' jcov.info)"
echo "Total lines coverage: $(jq '.data[].totals.lines.percent' jcov.info)"
echo "Total regions coverage: $(jq '.data[].totals.regions.percent' jcov.info)"
echo "Total instantiations coverage: $(jq '.data[].totals.instantiations.percent' jcov.info)"
- name: Fail if function coverage is below 75%
run: |
fn_cov=$(jq '.data[].totals.functions.percent' jcov.info)
expected=75
if (( $(echo "$fn_cov < $expected" | bc -l) )); then
echo "Function coverage is below ${expected}%"
exit 1
fi
- name: Fail if line coverage is below 85%
run: |
ln_cov=$(jq '.data[].totals.lines.percent' jcov.info)
expected=85
if (( $(echo "$ln_cov < $expected" | bc -l) )); then
echo "Line coverage is below ${expected}%"
exit 1
fi