Skip to content

Commit

Permalink
Merge pull request #30 from saudiwin/gh-actions
Browse files Browse the repository at this point in the history
set up gh actions
  • Loading branch information
michalovadek authored Nov 19, 2024
2 parents 86ed827 + 257c8ad commit 3276a1b
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 4 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ this_data.rds
\.png
^CRAN-RELEASE$
^Meta$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
64 changes: 64 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples

on:
push:
branches: [main, master, develop]
pull_request:

name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Add cmdstanr repo
run: |
writeLines('options(repos = c(cmdstanr = "https://stan-dev.r-universe.dev", getOption(\"repos\")))', file("~/.Rprofile", "ab"))
shell: Rscript {0}

- name: Install cmdstanr
run: |
Rscript -e 'install.packages("cmdstanr", repos = c("https://stan-dev.r-universe.dev", getOption("repos")))'
- name: Fix toolchain
run: |
Rscript -e 'cmdstanr::check_cmdstan_toolchain(fix = TRUE)'
- name: Install CmdStan
run: |
Rscript -e 'cmdstanr::install_cmdstan(cores = 1)'
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--no-build-vignettes")'
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Description: Offers item-response theory (IRT) ideal-point estimation for binary
License: GPL
Depends:
methods,
R (>= 3.4.0)
R (>= 3.5.0)
Imports:
dplyr,
svDialogs,
Expand All @@ -34,14 +34,15 @@ Imports:
ggthemes,
posterior,
R.rsp,
Rcpp
Rcpp,
cmdstanr
Suggests:
loo,
lubridate,
cmdstanr
lubridate
Encoding: UTF-8
LazyData: true
NeedsCompilation: yes
SystemRequirements: GNU make
Additional_repositories: https://stan-dev.r-universe.dev
VignetteBuilder: R.rsp
RoxygenNote: 7.3.2

0 comments on commit 3276a1b

Please sign in to comment.