Make sub dir per language #24
Workflow file for this run
This file contains 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 | |
on: | |
push: | |
paths: | |
- "R/**" | |
- .github/workflows/r.yml | |
pull_request_target: | |
paths: | |
- "R/**" | |
- .github/workflows/r.yml | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
jobs: | |
r: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: any::rcmdcheck, any::covr, any::xml2 | |
needs: check, coverage | |
working-directory: R/remotebmi | |
- uses: r-lib/actions/check-r-package@v2 | |
with: | |
working-directory: R/remotebmi | |
- name: Test coverage | |
working-directory: R/remotebmi | |
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: ./R/cobertura.xml | |
plugin: noop | |
disable_search: true | |
use_oidc: true | |
- name: Show testthat output | |
if: always() | |
run: | | |
## -------------------------------------------------------------------- | |
find '${{ runner.temp }}/R/package' -name 'testthat.Rout*' -exec cat '{}' \; || true | |
shell: bash | |
- name: Upload test results | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-test-failures | |
path: ${{ runner.temp }}/R/package |