-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c010ca8
commit e075d70
Showing
7 changed files
with
170 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,60 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples | ||
# 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: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
branches: main | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "30 17 * * 6" | ||
|
||
name: R-CMD-check | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
R-CMD-check: | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
||
strategy: | ||
# fail-fast: true | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: macos-latest, r: 'release'} | ||
- {os: windows-latest, r: 'release'} | ||
- {os: macOS-latest, r: 'release'} | ||
- {os: ubuntu-20.04, r: 'devel', http-user-agent: 'release'} | ||
- {os: ubuntu-20.04, r: 'release'} | ||
- {os: ubuntu-20.04, r: 'oldrel-1'} | ||
- {os: ubuntu-22.04, r: 'release'} | ||
- {os: ubuntu-24.04, r: 'devel', http-user-agent: 'release'} | ||
- {os: ubuntu-24.04, r: 'release'} | ||
- {os: ubuntu-24.04, r: 'oldrel-1'} | ||
|
||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
R_KEEP_PKG_SOURCE: yes | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-pandoc@master | ||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- uses: r-lib/actions/setup-r@master | ||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
http-user-agent: ${{ matrix.config.http-user-agent }} | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@master | ||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: rcmdcheck | ||
|
||
- uses: r-lib/actions/check-r-package@master | ||
|
||
- name: Show testthat output | ||
if: always() | ||
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true | ||
shell: bash | ||
cache-version: 3 | ||
extra-packages: | | ||
any::rcmdcheck | ||
needs: | | ||
check | ||
- name: Upload check results | ||
if: failure() | ||
uses: actions/upload-artifact@main | ||
- uses: r-lib/actions/check-r-package@v2 | ||
with: | ||
name: ${{ runner.os }}-r${{ matrix.config.r }}-results | ||
path: check | ||
upload-snapshots: true | ||
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# 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: | ||
push: | ||
paths: | ||
- "R/**" | ||
- "README.Rmd" | ||
- '.github/workflows/document.yaml' | ||
workflow_dispatch: | ||
|
||
name: document.yaml | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
document: | ||
runs-on: ubuntu-24.04 | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
r-version: 'renv' | ||
|
||
- name: Install dependencies | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
cache-version: 2 | ||
extra-packages: | | ||
any::roxygen2 | ||
any::devtools | ||
needs: | | ||
roxygen2 | ||
devtools | ||
- name: Document | ||
run: roxygen2::roxygenise() | ||
shell: Rscript {0} | ||
|
||
- name: Build readme | ||
run: devtools::build_readme() | ||
shell: Rscript {0} | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" | ||
git add man/\* NAMESPACE DESCRIPTION | ||
git commit -m "(Github Actions): Update documentation" || echo "No changes to commit" | ||
git pull --ff-only | ||
git push origin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 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: | ||
pull_request: | ||
|
||
name: lint.yaml | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-24.04 | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
r-version: 'renv' | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
cache-version: 2 | ||
extra-packages: any::lintr, local::. | ||
needs: lint | ||
|
||
- name: Lint | ||
run: lintr::lint_package() | ||
shell: Rscript {0} | ||
env: | ||
LINTR_ERROR_ON_LINT: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,63 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples | ||
# 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: | ||
push: | ||
branches: [main, master] | ||
branches: main | ||
pull_request: | ||
branches: [main, master] | ||
|
||
name: test-coverage | ||
name: test-coverage.yaml | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
test-coverage: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
# runs-on: macos-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-r@v1 | ||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
r-version: 'renv' | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v1 | ||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: covr | ||
cache-version: 2 | ||
extra-packages: any::covr, any::xml2 | ||
needs: coverage | ||
|
||
- name: Test coverage | ||
run: covr::codecov() | ||
run: | | ||
cov <- covr::package_coverage( | ||
quiet = FALSE, | ||
clean = FALSE, | ||
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") | ||
) | ||
covr::to_cobertura(cov) | ||
shell: Rscript {0} | ||
|
||
- uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }} | ||
file: ./cobertura.xml | ||
plugin: noop | ||
disable_search: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Show testthat output | ||
if: always() | ||
run: | | ||
## -------------------------------------------------------------------- | ||
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true | ||
shell: bash | ||
|
||
- name: Upload test results | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-test-failures | ||
path: ${{ runner.temp }}/package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
linters: linters_with_defaults() # see vignette("lintr") | ||
encoding: "UTF-8" |