Skip to content

Commit

Permalink
more granular updates to workflow actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mtwesley committed Nov 25, 2024
1 parent f546a98 commit e33f9bb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 29 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,16 @@ jobs:

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

- name: Install Homebrew (macOS only)
- name: Install system dependencies (Linux only)
if: runner.os == 'Linux'
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::rcmdcheck
any::sessioninfo
any::remotes
- name: Install Homebrew and qpdf (macOS only)
if: runner.os == 'macOS'
uses: Homebrew/actions/setup-homebrew@master

Expand All @@ -69,28 +78,19 @@ jobs:
- name: Install greta and dependencies
shell: Rscript {0}
run: |
install.packages("remotes", repos = "https://cloud.r-project.org")
install.packages("rcmdcheck", repos = "https://cloud.r-project.org")
install.packages("sessioninfo", repos = "https://cloud.r-project.org")
install.packages("greta", repos = c("https://greta-dev.r-universe.dev", "https://cloud.r-project.org"))
library(greta)
install_greta_deps(timeout = 120)
- name: Verify Greta Environment
- name: Verify Greta environment
shell: Rscript {0}
run: |
library(greta)
greta::greta_sitrep()
shell: Rscript {0}
- name: Install package + deps
run: |
remotes::install_local(dependencies = TRUE, force = TRUE)
- name: R CMD check
run: rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')
- uses: r-lib/actions/check-r-package@v2
with:
args: '--no-manual --as-cran'

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
run: sessioninfo::session_info()
19 changes: 7 additions & 12 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ on:

name: test-coverage

permissions: read-all
permissions:
contents: read
actions: write

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RETICULATE_AUTOCONFIGURE: 'FALSE'

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -53,21 +56,13 @@ jobs:
shell: Rscript {0}

- name: Test coverage
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: r-lib/actions/test-coverage@v2
with:
type: covr

- 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
Expand Down

0 comments on commit e33f9bb

Please sign in to comment.