Skip to content

Commit

Permalink
Updating gha
Browse files Browse the repository at this point in the history
  • Loading branch information
pbreheny committed Feb 27, 2025
1 parent 92c117f commit c23e3b8
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 90 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/check-release.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

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

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

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

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

steps:
- uses: actions/checkout@v4

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

- 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@v2
with:
extra-packages: |
any::rcmdcheck
- uses: r-lib/actions/check-r-package@v2
with:
args: '"--no-manual"'

5 changes: 4 additions & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
extra-packages: |
any::pkgdown
any::corrplot
local::.
needs: website

- name: Build site
Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/pkgdown.yml

This file was deleted.

39 changes: 34 additions & 5 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
test-coverage:
runs-on: ubuntu-latest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # Corrected token name
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_FORCE_TEST: true

steps:
- uses: actions/checkout@v4
Expand All @@ -25,11 +26,39 @@ jobs:
with:
extra-packages: |
any::covr
any::glmnet
any::pROC
any::survival
any::xml2
needs: coverage

- name: Test coverage
run: covr::codecov(quiet=FALSE)
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
print(cov)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
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
5 changes: 5 additions & 0 deletions tests/test.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if (requireNamespace("tinytest", quietly=TRUE)) {
if (identical(tolower(Sys.getenv("R_FORCE_TEST")), "true")) {
tinytest::test_package("plmmr", pattern="^[^_].*\\.[rR]$")
}
}
5 changes: 0 additions & 5 deletions tests/tinytest.R

This file was deleted.

0 comments on commit c23e3b8

Please sign in to comment.