Skip to content

Commit bd4fd9c

Browse files
authored
Merge pull request #350 from ropensci/workflows
update workflows
2 parents ffc663f + e3d996f commit bd4fd9c

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

.github/workflows/R-CMD-check.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
branches:
77
- main
88

9-
name: R-CMD-check
9+
name: R-CMD-check.yaml
10+
11+
permissions: read-all
1012

1113
jobs:
1214

@@ -20,7 +22,7 @@ jobs:
2022
fail-fast: false
2123
matrix:
2224
config:
23-
- {os: macOS-latest, r: 'release'}
25+
- {os: macos-latest, r: 'release'}
2426
- {os: windows-latest, r: 'release'}
2527
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
2628
- {os: ubuntu-latest, r: 'release'}
@@ -32,7 +34,6 @@ jobs:
3234
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3335

3436
steps:
35-
3637
- uses: actions/checkout@v4
3738

3839
- uses: r-lib/actions/setup-pandoc@v2
@@ -51,3 +52,4 @@ jobs:
5152
- uses: r-lib/actions/check-r-package@v2
5253
with:
5354
upload-snapshots: true
55+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/test-coverage.yaml

+18-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
branches:
77
- main
88

9-
name: test-coverage
9+
name: test-coverage.yaml
10+
11+
permissions: read-all
1012

1113
jobs:
1214

@@ -15,7 +17,6 @@ jobs:
1517
runs-on: ubuntu-latest
1618

1719
env:
18-
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
1920
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2021

2122
steps:
@@ -27,29 +28,39 @@ jobs:
2728

2829
- uses: r-lib/actions/setup-r-dependencies@v2
2930
with:
30-
extra-packages: any::covr
31+
extra-packages: any::covr, any::xml2
3132
needs: coverage
3233

3334
- name: Test coverage
3435
run: |
35-
covr::codecov(
36+
cov <- covr::package_coverage(
3637
quiet = FALSE,
3738
clean = FALSE,
38-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package"),
39+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package"),
3940
line_exclusions = list('R/overpass-query.R', 'src/rapidxml.h','src/rapidxml_print.h'),function_exclusions=c('osm_elevation','check_elev_file')
4041
)
42+
covr::to_cobertura(cov)
4143
shell: Rscript {0}
4244

45+
- uses: codecov/codecov-action@v4
46+
with:
47+
# Fail if error if not on PR, or if on PR and token is given
48+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
49+
file: ./cobertura.xml
50+
plugin: noop
51+
disable_search: true
52+
token: ${{ secrets.CODECOV_TOKEN }}
53+
4354
- name: Show testthat output
4455
if: always()
4556
run: |
4657
## --------------------------------------------------------------------
47-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
58+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
4859
shell: bash
4960

5061
- name: Upload test results
5162
if: failure()
52-
uses: actions/upload-artifact@v3
63+
uses: actions/upload-artifact@v4
5364
with:
5465
name: coverage-test-failures
5566
path: ${{ runner.temp }}/package

codemeta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"codeRepository": "https://github.com/ropensci/osmdata/",
1212
"issueTracker": "https://github.com/ropensci/osmdata/issues",
1313
"license": "https://spdx.org/licenses/GPL-3.0",
14-
"version": "0.2.5.025",
14+
"version": "0.2.5.026",
1515
"programmingLanguage": {
1616
"@type": "ComputerLanguage",
1717
"name": "R",

0 commit comments

Comments
 (0)