CRAN prep: Add renv and update package metadata #90
Workflow file for this run
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
| # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | |
| # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
| on: | |
| push: | |
| branches: [main, dev, master] | |
| pull_request: | |
| branches: [main, dev, master] | |
| name: test-coverage | |
| jobs: | |
| test-coverage: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| use-public-rspm: true | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| extra-packages: any::covr | |
| needs: coverage | |
| - name: Install Codecov CLI | |
| run: pip install codecov-cli | |
| - name: Run tests and generate coverage report | |
| run: | | |
| cov <- covr::package_coverage() | |
| covr::to_cobertura(cov, "coverage.xml") | |
| shell: Rscript {0} | |
| - name: Upload coverage report to Codecov | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| run: | | |
| codecov-cli upload-process -f "coverage.xml" -t "$CODECOV_TOKEN" | |
| shell: bash | |
| - 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 |