Skip to content

Commit a9d5a60

Browse files
update workflows
1 parent 318861e commit a9d5a60

File tree

4 files changed

+67
-42
lines changed

4 files changed

+67
-42
lines changed

.github/workflows/R-CMD-check.yaml

+40-28
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,52 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
5-
#
6-
# See https://github.com/r-lib/actions/tree/master/examples#readme for
7-
# additional example workflows available for the R community.
8-
9-
name: R
10-
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
113
on:
124
push:
13-
branches: [ "main" ]
5+
branches: [main, master]
146
pull_request:
15-
branches: [ "main" ]
7+
branches: [main, master]
8+
9+
name: R-CMD-check.yaml
1610

17-
permissions:
18-
contents: read
11+
permissions: read-all
1912

2013
jobs:
21-
build:
22-
runs-on: macos-latest
14+
R-CMD-check:
15+
runs-on: ${{ matrix.config.os }}
16+
17+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
18+
2319
strategy:
20+
fail-fast: false
2421
matrix:
25-
r-version: ['3.6.3', '4.1.1']
22+
config:
23+
- {os: macos-latest, r: 'release'}
24+
- {os: windows-latest, r: 'release'}
25+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
26+
- {os: ubuntu-latest, r: 'release'}
27+
- {os: ubuntu-latest, r: 'oldrel-1'}
28+
29+
env:
30+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
31+
R_KEEP_PKG_SOURCE: yes
2632

2733
steps:
2834
- uses: actions/checkout@v4
29-
- name: Set up R ${{ matrix.r-version }}
30-
uses: r-lib/actions/setup-r@f57f1301a053485946083d7a45022b278929a78a
35+
36+
- uses: r-lib/actions/setup-pandoc@v2
37+
38+
- uses: r-lib/actions/setup-r@v2
39+
with:
40+
r-version: ${{ matrix.config.r }}
41+
http-user-agent: ${{ matrix.config.http-user-agent }}
42+
use-public-rspm: true
43+
44+
- uses: r-lib/actions/setup-r-dependencies@v2
45+
with:
46+
extra-packages: any::rcmdcheck
47+
needs: check
48+
49+
- uses: r-lib/actions/check-r-package@v2
3150
with:
32-
r-version: ${{ matrix.r-version }}
33-
- name: Install dependencies
34-
run: |
35-
install.packages(c("remotes", "rcmdcheck"))
36-
remotes::install_deps(dependencies = TRUE)
37-
shell: Rscript {0}
38-
- name: Check
39-
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
40-
shell: Rscript {0}
51+
upload-snapshots: true
52+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/test-coverage.yaml

+18-10
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,56 @@ on:
66
pull_request:
77
branches: [main, master]
88

9-
name: test-coverage
9+
name: test-coverage.yaml
10+
11+
permissions: read-all
1012

1113
jobs:
1214
test-coverage:
1315
runs-on: ubuntu-latest
1416
env:
1517
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1718

1819
steps:
19-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2021

2122
- uses: r-lib/actions/setup-r@v2
2223
with:
2324
use-public-rspm: true
2425

2526
- uses: r-lib/actions/setup-r-dependencies@v2
2627
with:
27-
extra-packages: any::covr
28+
extra-packages: any::covr, any::xml2
2829
needs: coverage
2930

3031
- name: Test coverage
3132
run: |
32-
covr::codecov(
33+
cov <- covr::package_coverage(
3334
quiet = FALSE,
3435
clean = FALSE,
35-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
36+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3637
)
38+
covr::to_cobertura(cov)
3739
shell: Rscript {0}
3840

41+
- uses: codecov/codecov-action@v4
42+
with:
43+
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
44+
file: ./cobertura.xml
45+
plugin: noop
46+
disable_search: true
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
3949
- name: Show testthat output
4050
if: always()
4151
run: |
4252
## --------------------------------------------------------------------
43-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
53+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
4454
shell: bash
4555

4656
- name: Upload test results
4757
if: failure()
48-
uses: actions/upload-artifact@v3
58+
uses: actions/upload-artifact@v4
4959
with:
5060
name: coverage-test-failures
5161
path: ${{ runner.temp }}/package
52-
- name: Upload coverage reports to Codecov
53-
uses: codecov/codecov-action@v3

README.Rmd

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ knitr::opts_chunk$set(
1616
# Multidimensional Top Scoring for Creativity Research <img src="./man/figures/mtscr-hex.svg" width="200" align="right"/> {#multidimensional-top-scoring-for-creativity-research}
1717

1818
<!-- badges: start -->
19-
20-
[![codecov](https://codecov.io/gh/jakub-jedrusiak/mtscr/branch/main/graph/badge.svg?token=N3UGHFK5QN)](https://app.codecov.io/gh/jakub-jedrusiak/mtscr) [![R-CMD-check](https://github.com/jakub-jedrusiak/mtscr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jakub-jedrusiak/mtscr/actions/workflows/R-CMD-check.yaml)
2119
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
2220
[![CRAN/METACRAN](https://img.shields.io/cran/v/mtscr)](https://CRAN.R-project.org/package=mtscr)
21+
[![R-CMD-check](https://github.com/jakub-jedrusiak/mtscr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jakub-jedrusiak/mtscr/actions/workflows/R-CMD-check.yaml)
22+
[![Codecov test coverage](https://codecov.io/gh/jakub-jedrusiak/mtscr/graph/badge.svg)](https://app.codecov.io/gh/jakub-jedrusiak/mtscr)
2323
<!-- badges: end -->
2424

2525
An R adaptation of Multidimensional Top Scoring method presented by Forthmann, Karwowski and Beaty ([2023](https://doi.org/10.1037/aca0000571)) using the code from the [OSF database](https://osf.io/7rgsp/). The code was adapted to use the [tidyverse](https://www.tidyverse.org/) framework for greater flexibility.

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55

66
<!-- badges: start -->
77

8-
[![codecov](https://codecov.io/gh/jakub-jedrusiak/mtscr/branch/main/graph/badge.svg?token=N3UGHFK5QN)](https://app.codecov.io/gh/jakub-jedrusiak/mtscr)
9-
[![R-CMD-check](https://github.com/jakub-jedrusiak/mtscr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jakub-jedrusiak/mtscr/actions/workflows/R-CMD-check.yaml)
108
[![Lifecycle:
119
stable](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
1210
[![CRAN/METACRAN](https://img.shields.io/cran/v/mtscr)](https://CRAN.R-project.org/package=mtscr)
11+
[![R-CMD-check](https://github.com/jakub-jedrusiak/mtscr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jakub-jedrusiak/mtscr/actions/workflows/R-CMD-check.yaml)
12+
[![Codecov test
13+
coverage](https://codecov.io/gh/jakub-jedrusiak/mtscr/graph/badge.svg)](https://app.codecov.io/gh/jakub-jedrusiak/mtscr)
1314
<!-- badges: end -->
1415

1516
An R adaptation of Multidimensional Top Scoring method presented by
@@ -57,6 +58,10 @@ library("mtscr")
5758
data("mtscr_creativity", package = "mtscr")
5859

5960
mtscr_score(mtscr_creativity, id, item, SemDis_MEAN, top = 1:2)
61+
#> Warning in checkDepPackageVersion(dep_pkg = "TMB"): Package version inconsistency detected.
62+
#> glmmTMB was built with TMB version 1.9.11
63+
#> Current TMB version is 1.9.15
64+
#> Please re-install glmmTMB from source or restore original 'TMB' package (see '?reinstalling' for more information)
6065
#> # A tibble: 149 × 3
6166
#> id .creativity_score_top1 .creativity_score_top2
6267
#> <chr> <dbl> <dbl>

0 commit comments

Comments
 (0)