Skip to content

Commit

Permalink
Update actions (#769)
Browse files Browse the repository at this point in the history
* update actions

* update `simulate_*` snapshots (#780)

* install rstan from CRAN explicitly (#782)

* use github version for cmdstanr

* Revert "update `simulate_*` snapshots (#780)"

This reverts commit a21fbf8.

* setup pandoc

* use epinowcast action

---------

Co-authored-by: Sebastian Funk <[email protected]>
  • Loading branch information
seabbs and sbfnk authored Sep 27, 2024
1 parent d4218c1 commit 95c3643
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 31 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/R-CMD-as-cran-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,21 @@ jobs:
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
extra-repositories: https://mc-stan.org/r-packages/

- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: NA
extra-packages: |
rcmdcheck
rmarkdown
cmdstanr
stan-dev/cmdstanr
testthat
- name: Install cmdstan
run: |
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
cmdstanr::install_cmdstan(cores = 2, quiet = TRUE)
shell: Rscript {0}
uses: epinowcast/actions/install-cmdstan@v1
with:
cmdstan-version: 'latest'
num-cores: 2

- uses: r-lib/actions/check-r-package@v2
with:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,22 @@ jobs:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
extra-repositories: https://mc-stan.org/r-packages/

- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: NA
extra-packages: |
rmarkdown
rcmdcheck
cmdstanr
stan-dev/cmdstanr
testthat
- name: Install cmdstan
if: runner.os != 'Windows'
run: |
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
cmdstanr::install_cmdstan(cores = 2, quiet = TRUE)
shell: Rscript {0}
uses: epinowcast/actions/install-cmdstan@v1
with:
cmdstan-version: 'latest'
num-cores: 2

- uses: r-lib/actions/check-r-package@v2
with:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/lint-only-changed-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@ jobs:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
extra-repositories: https://mc-stan.org/r-packages/

- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: NA
extra-packages: |
here
usethis
cmdstanr
stan-dev/cmdstanr
any::gh
any::lintr
any::purrr
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: NA
extra-packages: |
epiforecasts/EpiNow2
pkgdown
extra-packages: pkgdown local::.

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/stan-model-benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,20 @@ jobs:
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
extra-repositories: https://mc-stan.org/r-packages/

- uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: |
local::.
here
purrr
cmdstanr
stan-dev/cmdstanr
- name: Install cmdstan
run: |
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
cmdstanr::install_cmdstan(cores = 2, quiet = TRUE)
shell: Rscript {0}
uses: epinowcast/actions/install-cmdstan@v1
with:
cmdstan-version: 'latest'
num-cores: 2

- name: Checkout main branch in parallel and move to separate dir
run: |
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:

name: test-coverage

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

jobs:
test-coverage:
runs-on: macos-latest
Expand All @@ -21,24 +25,26 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
extra-repositories: https://mc-stan.org/r-packages/

- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: NA
extra-packages: |
covr
cmdstanr
stan-dev/cmdstanr
testthat
- name: Install cmdstan
run: |
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
cmdstanr::install_cmdstan(cores = 2, quiet = TRUE)
shell: Rscript {0}
if: runner.os != 'Windows'
uses: epinowcast/actions/install-cmdstan@v1
with:
cmdstan-version: 'latest'
num-cores: 2

- name: Test coverage
run: covr::codecov(quiet = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ LinkingTo:
rstan (>= 2.26.0),
StanHeaders (>= 2.26.0)
Additional_repositories:
https://mc-stan.org/r-packages/
https://stan-dev.r-universe.dev
Biarch: true
Config/testthat/edition: 3
Encoding: UTF-8
Expand Down

0 comments on commit 95c3643

Please sign in to comment.