Skip to content

a

a #53

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.
name: R
on:
push:
branches: [ "main", "devel" ]
pull_request:
branches: [ "main", "devel" ]
permissions: read-all
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
r-version: ['4.2.1']
os: [ubuntu-22.04, macos-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: '"all"'
extra-packages: any::covr, any::xml2
needs: coverage
- name: Show R version
run: |
cat(R.version.string, "\n")
shell: Rscript {0}
- name: Test coverage
run: |
cov <- covr::package_coverage(
type = "tests",
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov, file = "cobertura.xml")
shell: Rscript {0}
- name: where is cobertura file
run: ls -lh
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
files: ./cobertura.xml
token: ${{ secrets.CODECOV }}
slug: blasif/cocons
env:
CODECOV_TOKEN: ${{ secrets.CODECOV }}
- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash