corrected coverage yml2 #5
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: test-coverage | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| use-public-rspm: true | |
| - name: Install system deps | |
| run: sudo apt-get update | |
| # install deps INSIDE the package dir | |
| - name: Install R deps | |
| working-directory: OpenStats | |
| run: | | |
| Rscript -e 'install.packages(c("remotes", "covr"))' | |
| Rscript -e 'remotes::install_deps(dependencies = TRUE)' | |
| - name: Run coverage | |
| working-directory: OpenStats | |
| run: | | |
| Rscript -e 'cov <- covr::package_coverage(); print(cov); covr::codecov(cov)' | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |