Skip to content

Merge branch 'main' into test-code #8

Merge branch 'main' into test-code

Merge branch 'main' into test-code #8

Workflow file for this run

name: R tests and coverage
on:
push:
pull_request:
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: release
- name: Install test dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: always
install-pandoc: false
install-quarto: false
dependencies: '"hard"'
needs: ci
- name: Run tests
working-directory: tests
run: Rscript testthat.R
- name: Report coverage
working-directory: tests
run: Rscript coverage.R
- name: Update coverage badge
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
uses: jpb06/coverage-badges-action@latest
with:
coverage-summary-path: coverage/coverage-summary.json
output-folder: tests/badges
badges-labels-prefix: ""
commit-message: "Update coverage badge [skip ci]"