Skip to content

test to run

test to run #2

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@v4
- 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:
packages: |
any::testthat
any::covr
any::jsonlite
- name: Run tests
working-directory: tests
run: Rscript testthat.R
- name: Report coverage
working-directory: tests
run: Rscript coverage.R
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage-report/
- name: Update coverage badge
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
uses: we-cli/coverage-badge-action@v1.0.1