prep cran submission #128
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
| on: | |
| push: | |
| branches: | |
| - dev | |
| - main | |
| paths: | |
| - '**.R' | |
| - '**.Rmd' | |
| - 'DESCRIPTION' | |
| - 'NAMESPACE' | |
| - '.github/workflows/R.yaml' | |
| pull_request: | |
| paths: | |
| - '**.R' | |
| - '**.Rmd' | |
| - 'DESCRIPTION' | |
| - 'NAMESPACE' | |
| - '.github/workflows/R.yaml' | |
| name: R-cmd-check | |
| jobs: | |
| R: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| R_KEEP_PKG_SOURCE: yes | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| use-public-rspm: true | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| extra-packages: | | |
| any::rcmdcheck | |
| any::covr | |
| any::lintr | |
| - name: Lint root directory | |
| run: lintr::lint_dir() | |
| shell: Rscript {0} | |
| continue-on-error: true | |
| env: | |
| LINTR_ERROR_ON_LINT: true | |
| - uses: r-lib/actions/check-r-package@v2 | |
| - name: Test coverage | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| run: | | |
| covr::codecov( | |
| quiet = FALSE, | |
| clean = FALSE, | |
| install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") | |
| ) | |
| shell: Rscript {0} | |
| - name: Show testthat output | |
| if: always() | |
| run: | | |
| ## -------------------------------------------------------------------- | |
| find '${{ runner.temp }}/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 }}/package |