Skip to content

Commit

Permalink
ci: update CI and Coverage config files
Browse files Browse the repository at this point in the history
  • Loading branch information
rCarto committed Apr 24, 2024
1 parent a44ded5 commit 1b7a382
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
^route\.png$
^trip\.png$
^codecov.yml
^codecov\.yml$
5 changes: 3 additions & 2 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
Expand All @@ -29,7 +29,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -47,3 +47,4 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
16 changes: 14 additions & 2 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -27,5 +27,17 @@ jobs:
needs: coverage

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

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
8 changes: 8 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
comment: false

coverage:
status:
project:
default:
target: 80%
threshold: 10%
informational: true
patch:
default:
target: 80%
threshold: 10%
informational: true
2 changes: 1 addition & 1 deletion tests/tinytest.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if (requireNamespace("tinytest", quietly = TRUE)) {
local_server <- FALSE
demo_server <- FALSE
demo_server <- TRUE
suppressPackageStartupMessages(library(sf))
x_sf <- st_read(system.file("gpkg/apotheke.gpkg", package = "osrm"),
quiet = TRUE
Expand Down

0 comments on commit 1b7a382

Please sign in to comment.