Skip to content

Commit f2cb657

Browse files
committed
upgrade checklist GHA
1 parent ff11140 commit f2cb657

File tree

9 files changed

+72
-107
lines changed

9 files changed

+72
-107
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ We are committed to making participation in this project a harassment-free exper
88
everyone, regardless of level of experience, gender, gender identity and expression,
99
sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
1010

11-
Examples of unacceptable behavior by participants include the use of sexual language or
11+
Examples of unacceptable behaviour by participants include the use of sexual language or
1212
imagery, derogatory comments or personal attacks, trolling, public or private harassment,
1313
insults, or other unprofessional conduct.
1414

@@ -17,7 +17,7 @@ commits, code, wiki edits, issues, and other contributions that are not aligned
1717
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed
1818
from the project team.
1919

20-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
20+
Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported by
2121
opening an issue or contacting one or more of the project maintainers.
2222

2323
This Code of Conduct is adapted from the Contributor Covenant

.github/CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
### Fixing typos
44

55
Small typos or grammatical errors in documentation may be edited directly using the GitHub web interface, so long as the changes are made in the _source_ file.
6-
E.g. edit a roxygen comment in a `.R` file below `R/`, not in an `.Rd` file below `man/`.
6+
E.g. edit a `roxygen2` comment in a `.R` file below `R/`, not in an `.Rd` file below `man/`.
77

88
### Prerequisites
99

1010
Before you make a substantial pull request, you should always file an issue and make sure someone from the team agrees that it’s a problem.
11-
If you’ve found a bug, create an associated issue and illustrate the bug with a minimal [reprex](https://www.tidyverse.org/help/#reprex).
11+
If you’ve found a bug, create an associated issue and illustrate the bug with a minimal [reproducible example](https://www.tidyverse.org/help/#reprex).
1212

1313
### Pull request process
1414

1515
* We recommend that you create a Git branch for each pull request (PR).
1616
* Look at the GitHub Actions build status before and after making changes.
1717
The `README` should contain badges for any continuous integration services used by the package.
18-
* We require the tidyverse [style guide](http://style.tidyverse.org).
19-
You can use the [styler](https://CRAN.R-project.org/package=styler) package to apply these styles, but please don't restyle code that has nothing to do with your PR.
20-
* We use [roxygen2](https://cran.r-project.org/package=roxygen2).
21-
* We use [testthat](https://cran.r-project.org/package=testthat).
18+
* We require the `tidyverse` [style guide](http://style.tidyverse.org).
19+
You can use the [`styler`](https://CRAN.R-project.org/package=styler) package to apply these styles, but please don't restyle code that has nothing to do with your PR.
20+
* We use [`roxygen2`](https://cran.r-project.org/package=roxygen2).
21+
* We use [`testthat`](https://cran.r-project.org/package=testthat).
2222
Contributions with test cases included are easier to accept.
2323
* For user-facing changes, add a bullet to the top of `NEWS.md` below the current development version header describing the changes made followed by your GitHub username, and links to relevant issue(s)/PR(s).
2424

@@ -36,4 +36,4 @@ email is totally warranted if it's a sensitive problem of any kind.
3636

3737
### Thanks for contributing!
3838

39-
This contributing guide is adapted from the tidyverse contributing guide available at https://raw.githubusercontent.com/r-lib/usethis/master/inst/templates/tidy-contributing.md
39+
This contributing guide is adapted from the `tidyverse` contributing guide available at https://raw.githubusercontent.com/r-lib/usethis/master/inst/templates/tidy-contributing.md

.github/workflows/check_on_branch.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ on:
55
- master
66
- ghpages
77

8-
name: "check package"
8+
name: "check package with checklist"
99

1010
jobs:
1111
check-package:
1212
runs-on: ubuntu-latest
1313
name: "check package"
1414
env:
1515
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
16-
ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
permissions:
18+
contents: read
1719
steps:
18-
- uses: inbo/actions/check_pkg@master
19-
with:
20-
token: ${{ secrets.PAT }}
20+
- uses: inbo/actions/check_pkg@main

.github/workflows/check_on_different_r_os.yml

Lines changed: 11 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -22,78 +22,30 @@ jobs:
2222
config:
2323
- {os: macOS-latest, r: 'release'}
2424
- {os: windows-latest, r: 'release'}
25-
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
26-
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
25+
- {os: ubuntu-22.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
26+
- {os: ubuntu-22.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
2727

2828
env:
2929
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
3030
_R_CHECK_SYSTEM_CLOCK_: false
3131
RSPM: ${{ matrix.config.rspm }}
3232
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
33-
ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
3433

3534
steps:
36-
- uses: actions/checkout@v2
35+
- uses: actions/checkout@v3
3736

38-
- uses: r-lib/actions/setup-r@master
37+
- uses: r-lib/actions/setup-r@v2
3938
with:
4039
r-version: ${{ matrix.config.r }}
40+
extra-repositories: https://inbo.r-universe.dev
4141

42-
- uses: r-lib/actions/setup-pandoc@master
42+
- uses: r-lib/actions/setup-pandoc@v2
4343

44-
- name: Query dependencies
45-
run: |
46-
install.packages('remotes')
47-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
48-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
49-
shell: Rscript {0}
50-
51-
- name: Cache R packages
52-
if: runner.os != 'Windows'
53-
uses: actions/cache@v1
44+
- uses: r-lib/actions/setup-r-dependencies@v2
5445
with:
55-
path: ${{ env.R_LIBS_USER }}
56-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
57-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
58-
59-
- name: Install system dependencies
60-
if: runner.os == 'Linux'
61-
env:
62-
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
63-
run: |
64-
Rscript -e "remotes::install_github('r-hub/sysreqs')"
65-
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
66-
sudo -s eval "$sysreqs"
67-
sudo apt-get install -y libcurl4-openssl-dev
68-
69-
- name: Install dependencies
70-
run: |
71-
remotes::install_deps(dependencies = TRUE)
72-
remotes::install_cran("rcmdcheck")
73-
shell: Rscript {0}
74-
75-
- name: Session info
76-
run: |
77-
options(width = 100)
78-
pkgs <- installed.packages()[, "Package"]
79-
sessioninfo::session_info(pkgs, include_base = TRUE)
80-
shell: Rscript {0}
81-
82-
- name: Check
83-
env:
84-
_R_CHECK_CRAN_INCOMING_: false
85-
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "error", check_dir = "check")
86-
shell: Rscript {0}
87-
88-
- name: Show testthat output
89-
if: always()
90-
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
91-
shell: bash
46+
extra-packages: any::rcmdcheck
47+
needs: check
9248

93-
- name: Upload check results
94-
if: failure()
95-
uses: actions/upload-artifact@master
49+
- uses: r-lib/actions/check-r-package@v2
9650
with:
97-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
98-
path: check
99-
retention-days: 5
51+
error-on: '"error"'

.github/workflows/check_on_main.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ on:
33
branches:
44
- main
55
- master
6-
schedule:
7-
- cron: '6 0 15 * *'
6+
permissions:
7+
contents: write
88

9-
name: "check package on main"
9+
name: "check package on main with checklist"
1010

1111
jobs:
1212
check-package:
1313
runs-on: ubuntu-latest
1414
name: "check package"
1515
env:
1616
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
17-
ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
steps:
19-
- uses: inbo/actions/check_pkg@master
20-
with:
21-
token: ${{ secrets.PAT }}
19+
- uses: inbo/actions/check_pkg@main

.github/workflows/release.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1+
name: Releases
2+
13
on:
24
push:
35
tags:
4-
- 'v*'
5-
6-
name: Create Release
6+
- v*
7+
workflow_run:
8+
workflows: ["check package on main"]
9+
types:
10+
- completed
711

812
jobs:
13+
914
build:
10-
name: Create Release
1115
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
1218
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
1520
- name: Get tag message
1621
run: |
17-
TAG_BODY=$(git tag --contains ${{ github.sha }} -n100 | awk '(NR>1)')
18-
echo "::set-output name=TAG_BODY::$TAG_BODY"
22+
TAG=$(git tag --contains $(git rev-parse HEAD))
23+
TAG_BODY=$(git tag --contains $(git rev-parse HEAD) -n100 | awk '(NR>2)')
24+
echo "TAG=$TAG" >> $GITHUB_OUTPUT
25+
echo "TAG_BODY=$TAG_BODY" >> $GITHUB_OUTPUT
1926
id: tag-body
20-
- name: Create Release
21-
id: create_release
22-
uses: actions/create-release@v1
23-
env:
24-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
- uses: ncipollo/release-action@v1
2528
with:
26-
tag_name: ${{ github.ref }}
27-
release_name: Release ${{ github.ref }}
29+
name: Release ${{ steps.tag-body.outputs.TAG }}
30+
tag: ${{ steps.tag-body.outputs.TAG }}
2831
body: ${{ steps.tag-body.outputs.TAG_BODY }}
29-
draft: false
30-
prerelease: false

.gitignore

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1+
*.dbf
2+
*.doc*
3+
*.gddoc
4+
*.gdsheet
5+
*.gpkg
6+
*.html
7+
*.mdb
8+
*.shp*
9+
*.shx
10+
*.xls*
11+
*_files
112
.DS_Store
2-
.httr-oauth
313
.RData
14+
.Renviron
415
.Rhistory
516
.Rproj.user
617
.Ruserdata
7-
*.html
18+
.httr-oauth
819
docs
20+
libs
21+
output
22+
renv/library

_pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ navbar:
1717
href: https://www.facebook.com/pg/INBOVlaanderen
1818

1919
authors:
20-
Research Institute for Nature and Forest:
20+
Research Institute for Nature and Forest (INBO):
2121
href: "https://www.vlaanderen.be/inbo/en-gb"
2222
html: "<img src='https://inbo.github.io/checklist/reference/figures/logo-en.png' height=24>"

codecov.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
comment: true
22

33
coverage:
4-
precision: 2
4+
precision: 1
55
round: down
66
range: "70...100"
77
status:
8-
project:
9-
default:
10-
target: auto
11-
threshold: 0%
12-
informational: false
138
patch:
149
default:
1510
target: auto
16-
threshold: 0%
11+
threshold: 10%
1712
informational: true
13+
project:
14+
default:
15+
target: auto
16+
threshold: 1%
17+
informational: false

0 commit comments

Comments
 (0)