This repository has been archived by the owner on Jun 21, 2024. It is now read-only.
Merge pull request #1 from ThinkR-open/main #15
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
on: | |
push: | |
branches: [main, uat, production, test-ci] | |
name: test-coverage | |
jobs: | |
test-coverage: | |
runs-on: ubuntu-latest | |
container: rocker/geospatial:4.3.2 | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set repos option to match thinkr dev env | |
run: bash dev/ci/set_repos_option_to_match_thinkr_dev_env.sh | |
- name: Install application dependencies | |
run: | | |
install.packages("pak") | |
pak::pkg_install("covr", upgrade = FALSE) | |
pak::local_install(upgrade = FALSE, dependencies = TRUE) | |
shell: Rscript {0} | |
- name: Test coverage | |
run: | | |
covr::codecov( | |
quiet = FALSE, | |
clean = FALSE, | |
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "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 |