moved tests from Randomizaszion/development to inst/tinytest #58
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 R deps | |
| working-directory: OpenStats | |
| run: | | |
| Rscript -e 'install.packages(c("remotes", "covr", "jsonlite"))' | |
| Rscript -e 'remotes::install_deps(dependencies = TRUE)' | |
| - name: Run coverage and write reports | |
| working-directory: OpenStats | |
| run: | | |
| Rscript -e 'cov <- covr::package_coverage(); df <- as.data.frame(cov); write.csv(df, "coverage.csv", row.names = FALSE); write.csv(as.data.frame(covr::percent_coverage(cov)), "coverage_total.csv", row.names = FALSE)' | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: | | |
| OpenStats/coverage.csv | |
| OpenStats/coverage_total.csv |