Skip to content

updates to codecov action #1

updates to codecov action

updates to codecov action #1

Workflow file for this run

# Reusable workflow to calculate coverage from codecov.io
on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: true
inputs:
use-public-rspm:
required: false
type: boolean
default: true
name: calc-coverage
jobs:
calc-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:

Check failure on line 21 in .github/workflows/calc-coverage.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/calc-coverage.yml

Invalid workflow file

You have an error in your yaml syntax on line 21
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: ${{ inputs.use-public-rspm }}
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2
needs: coverage
- name: Test coverage
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}