Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed May 12, 2024
1 parent 4336a08 commit f434890
Show file tree
Hide file tree
Showing 21 changed files with 84 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check-devel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
needs: check
extra-packages: |
any::rcmdcheck
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check-hard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
dependencies: '"hard"'
cache: false
extra-packages: |
Expand Down
62 changes: 0 additions & 62 deletions .github/workflows/R-CMD-check-strict.yaml

This file was deleted.

49 changes: 38 additions & 11 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:

name: R-CMD-check

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
Expand All @@ -18,20 +22,28 @@ jobs:
fail-fast: false
matrix:
config:
# Checks are not run on R-devel because they are already run in
# `R-CMD-check-strict` workflow

#- { os: macos-latest, r: "devel" }
- { os: macos-latest, r: "release" }
- { os: macos-latest, r: "oldrel-1" }
#- {os: macOS-latest, r: 'devel'}
- { os: macOS-latest, r: "release" }
- { os: macOS-latest, r: "oldrel" }
#- {os: macOS-latest, r: 'oldrel-2'}
#- {os: macOS-latest, r: 'oldrel-3'}

#- { os: windows-latest, r: "devel" }
#- { os: windows-latest, r: "next" }
- { os: windows-latest, r: "devel" }
- { os: windows-latest, r: "release" }
- { os: windows-latest, r: "oldrel-1" }
- { os: windows-latest, r: "oldrel" }
#- {os: windows-latest, r: 'oldrel-2'}
#- {os: windows-latest, r: 'oldrel-3'}

#- { os: ubuntu-latest, r: "devel" }
#- { os: ubuntu-latest, r: "release" }
#- { os: ubuntu-latest, r: "oldrel-1" }
# use 4.1 to check with rtools40's older compiler
#- { os: windows-latest, r: "4.1" }

#- { os: ubuntu-latest, r: "next" }
- { os: ubuntu-latest, r: "devel" }
- { os: ubuntu-latest, r: "release" }
#- { os: ubuntu-latest, r: "oldrel" }
#- { os: ubuntu-latest, r: "oldrel-2" }
#- { os: ubuntu-latest, r: "oldrel-3" }

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -55,8 +67,23 @@ jobs:
upgrade: 'TRUE'
extra-packages: |
any::rcmdcheck
Matrix=?ignore-before-r=100.0.0
lme4=?ignore-before-r=100.0.0
TMB=?ignore-before-r=100.0.0
needs: check

- name: Install packages from source
run: |
utils::install.packages(c("Matrix", "lme4", "TMB"), type = "source")
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
upload-results: true
error-on: 'ifelse(getRversion() > "4.3", "note", "warning")'
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
_R_CHECK_CRAN_INCOMING_: false
_R_CHECK_FORCE_SUGGESTS_: false
_R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_: true
2 changes: 1 addition & 1 deletion .github/workflows/check-all-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
extra-packages: |
any::devtools
local::.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-link-rot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
dependencies: '"hard"'
extra-packages: |
any::rcmdcheck
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-random-test-order.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
extra-packages: |
local::.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
extra-packages: |
local::.
any::gghalves
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-spelling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
dependencies: '"hard"'
extra-packages: |
any::rcmdcheck
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-styling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
dependencies: '"hard"'
extra-packages: |
local::.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-test-warnings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
extra-packages: |
local::.
any::devtools
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-vignette-warnings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
extra-packages: |
local::.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/html-5-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
extra-packages: |
any::rcmdcheck
any::V8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
extra-packages: |
r-lib/lintr
local::.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown-no-suggests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
dependencies: '"hard"'
cache: false
extra-packages: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
extra-packages: |
r-lib/pkgdown
local::.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/styler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
dependencies: '"hard"'
extra-packages: |
local::.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
extra-packages: |
any::covr
local::.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
upgrade: "TRUE"
extra-packages: |
any::covr
needs: coverage
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ default_language_version:

repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.3.2.9003
rev: v0.4.2
hooks:
- id: no-browser-statement
- id: no-debug-statement
- id: parsable-R
- id: deps-in-desc

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-json
Expand All @@ -30,7 +30,7 @@ repos:
)$
- repo: https://github.com/lorenzwalthert/gitignore-tidy
rev: "475bf5d96927a1887ce2863ff3075b1d7240bc51"
rev: "0.1.2"
hooks:
- id: tidy-gitignore

Expand Down
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# h/t to @jimhester and @yihui for this parse block:
# https://github.com/yihui/knitr/blob/dc5ead7bcfc0ebd2789fe99c527c7d91afb3de4a/Makefile#L1-L4
# Note the portability change as suggested in the manual:
# https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Writing-portable-packages
PKGNAME = `sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION`
PKGVERS = `sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION`


all: check

build: install_deps
R CMD build .

check: build
R CMD check --no-manual $(PKGNAME)_$(PKGVERS).tar.gz

install_deps:
Rscript \
-e 'if (!requireNamespace("remotes")) install.packages("remotes")' \
-e 'remotes::install_deps(dependencies = TRUE)'

install: build
R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz

clean:
@rm -rf $(PKGNAME)_$(PKGVERS).tar.gz $(PKGNAME).Rcheck

0 comments on commit f434890

Please sign in to comment.