Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 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:
# workflow_dispatch:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

Expand All @@ -15,8 +15,6 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
_R_CHECK_CRAN_INCOMING_: false

steps:
- uses: actions/checkout@v4
Expand All @@ -27,20 +25,31 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
cache-version: 2
extra-packages: |
any::covr
local::.
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
options(crayon.enabled = TRUE)
covr::codecov(
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
token = "${{secrets.CODECOV_TOKEN}}"
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
shell: Rscript {0}
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
9 changes: 8 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export(as_matrix)
export(as_rast)
export(as_vector)
export(as_wbw_raster)
export(expect_snapshot)
export(num_cells)
export(print_geotiff_tags)
export(stdev)
Expand All @@ -40,19 +39,27 @@ export(wbw_install)
export(wbw_is_float)
export(wbw_is_int)
export(wbw_is_rgb)
export(wbw_majority_filter)
export(wbw_max_procs)
export(wbw_maximum_filter)
export(wbw_mean_filter)
export(wbw_median_filter)
export(wbw_minimum_filter)
export(wbw_multidirectional_hillshade)
export(wbw_olympic_filter)
export(wbw_percentile_filter)
export(wbw_random_sample)
export(wbw_range_filter)
export(wbw_read_raster)
export(wbw_read_vector)
export(wbw_res)
export(wbw_rows)
export(wbw_ruggedness_index)
export(wbw_slope)
export(wbw_standard_deviation_filter)
export(wbw_to_degrees)
export(wbw_to_radians)
export(wbw_total_filter)
export(wbw_version)
export(wbw_write_raster)
export(wbw_xres)
Expand Down
Loading
Loading