Repository navigation
Merge branch 'main' into test-code #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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]" |