Skip to content

Commit 9b54b52

Browse files
update github workflow to be compatible actions/checkout@v4 (#11)
* update github workflow to be compatible actions/checkout@v4 * DESCRIPTION up to dev version
1 parent 557eaa7 commit 9b54b52

File tree

6 files changed

+82
-12
lines changed

6 files changed

+82
-12
lines changed

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

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
8+
name: R-CMD-check.yaml
9+
10+
permissions: read-all
11+
12+
jobs:
13+
R-CMD-check:
14+
runs-on: ${{ matrix.config.os }}
15+
16+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
config:
22+
- {os: macos-latest, r: 'release'}
23+
- {os: windows-latest, r: 'release'}
24+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
25+
- {os: ubuntu-latest, r: 'release'}
26+
- {os: ubuntu-latest, r: 'oldrel-1'}
27+
28+
env:
29+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
30+
R_KEEP_PKG_SOURCE: yes
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- uses: r-lib/actions/setup-pandoc@v2
36+
37+
- uses: r-lib/actions/setup-r@v2
38+
with:
39+
r-version: ${{ matrix.config.r }}
40+
http-user-agent: ${{ matrix.config.http-user-agent }}
41+
use-public-rspm: true
42+
43+
- uses: r-lib/actions/setup-r-dependencies@v2
44+
with:
45+
extra-packages: any::rcmdcheck
46+
needs: check
47+
48+
- uses: r-lib/actions/check-r-package@v2
49+
with:
50+
upload-snapshots: true
51+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/test-coverage.yaml

+19-8
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
branches: [main, master]
87

9-
name: test-coverage
8+
name: test-coverage.yaml
9+
10+
permissions: read-all
1011

1112
jobs:
1213
test-coverage:
@@ -15,36 +16,46 @@ jobs:
1516
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1617

1718
steps:
18-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
1920

2021
- uses: r-lib/actions/setup-r@v2
2122
with:
2223
use-public-rspm: true
2324

2425
- uses: r-lib/actions/setup-r-dependencies@v2
2526
with:
26-
extra-packages: any::covr
27+
extra-packages: any::covr, any::xml2
2728
needs: coverage
2829

2930
- name: Test coverage
3031
run: |
31-
covr::codecov(
32+
cov <- covr::package_coverage(
3233
quiet = FALSE,
3334
clean = FALSE,
34-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
35+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3536
)
37+
covr::to_cobertura(cov)
3638
shell: Rscript {0}
3739

40+
- uses: codecov/codecov-action@v4
41+
with:
42+
# Fail if error if not on PR, or if on PR and token is given
43+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
44+
file: ./cobertura.xml
45+
plugin: noop
46+
disable_search: true
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
3849
- name: Show testthat output
3950
if: always()
4051
run: |
4152
## --------------------------------------------------------------------
42-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
53+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
4354
shell: bash
4455

4556
- name: Upload test results
4657
if: failure()
47-
uses: actions/upload-artifact@v3
58+
uses: actions/upload-artifact@v4
4859
with:
4960
name: coverage-test-failures
5061
path: ${{ runner.temp }}/package

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: spMaps
22
Type: Package
33
Title: Europe SpatialPolygonsDataFrame Builder
4-
Version: 0.5.0
4+
Version: 0.5.1.9000
55
Authors@R: c(
66
person("Tatiana", "Vargas", email = "[email protected]", role = c("aut", "cre")),
77
person("Jalal-Edine", "ZAWAM", role = "aut"),

NEWS.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# spMaps 0.5.1.9000
2+
3+
GITHUB ACTIONS :
4+
5+
* Actions artifacts v3 is closing down, update to v4
6+
* test-coverage.yaml updated
7+
8+
19
# changes in version 0.5.0 (2023-08-31)
210

311
* rgeos and raster replaced by sf

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
> The `spMaps` package provides functions allow to build custom maps.
44
55
<!-- badges: start -->
6-
[![R-CMD-check](https://github.com/rte-antares-rpackage/spMaps/actions/workflows/check-standard.yaml/badge.svg)](https://github.com/rte-antares-rpackage/spMaps/actions/workflows/check-standard.yaml)
7-
[![Codecov test coverage](https://codecov.io/gh/rte-antares-rpackage/spMaps/branch/master/graph/badge.svg)](https://app.codecov.io/gh/rte-antares-rpackage/spMaps?branch=master)
6+
[![R-CMD-check](https://github.com/rte-antares-rpackage/spMaps/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rte-antares-rpackage/spMaps/actions/workflows/R-CMD-check.yaml)
7+
[![Codecov test coverage](https://codecov.io/gh/rte-antares-rpackage/spMaps/graph/badge.svg)](https://app.codecov.io/gh/rte-antares-rpackage/spMaps)
88
[![CRAN status](https://www.r-pkg.org/badges/version/spMaps)](https://CRAN.R-project.org/package=spMaps)
99
<!-- badges: end -->
1010

spMaps.Rproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ BuildType: Package
1818
PackageUseDevtools: Yes
1919
PackageInstallArgs: --no-multiarch --with-keep.source
2020
PackageCheckArgs: --no-manual
21-
PackageRoxygenize: rd,collate,namespace,vignette
21+
PackageRoxygenize: rd,collate,namespace

0 commit comments

Comments
 (0)