Skip to content

Commit

Permalink
Use standardized GHA workflows (#473)
Browse files Browse the repository at this point in the history
* Use standardized GHA workflows

easystats/easystats#234

* Update README

* Run example conditionally

* Bump needed versions
  • Loading branch information
IndrajeetPatil authored Sep 6, 2022
1 parent 492928a commit b9d3149
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 197 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
#
# NOTE: This workflow is overkill for most R packages and
# check-standard.yaml is likely a better choice.
# usethis::use_github_action("check-standard") will install it.
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
uses: easystats/workflows/.github/workflows/R-CMD-check.yaml@main
65 changes: 0 additions & 65 deletions .github/workflows/R-check.yaml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/check-readme.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help

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

name: check-readme

jobs:
check-readme:
uses: easystats/workflows/.github/workflows/check-readme.yaml@main
13 changes: 13 additions & 0 deletions .github/workflows/html-5-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: HTML5 check

jobs:
HTML5-check:
uses: easystats/workflows/.github/workflows/html-5-check.yaml@main
44 changes: 5 additions & 39 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,13 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- main
branches: [main, master]
pull_request:
branches:
- main
branches: [main, master]

name: lint

jobs:
lint:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("lintr")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Lint
run: lintr::lint_package()
shell: Rscript {0}
uses: easystats/workflows/.github/workflows/lint.yaml@main
36 changes: 1 addition & 35 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,4 @@ name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '2.19.2'

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

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

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
uses: easystats/workflows/.github/workflows/pkgdown.yaml@main
30 changes: 0 additions & 30 deletions .github/workflows/render-readme.yaml

This file was deleted.

20 changes: 1 addition & 19 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,4 @@ name: test-coverage

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

steps:
- uses: actions/checkout@v2

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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
uses: easystats/workflows/.github/workflows/test-coverage.yaml@main
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ Depends:
R (>= 3.5)
Imports:
bayestestR (>= 0.12.1),
insight (>= 0.18.0),
parameters (>= 0.18.1),
performance (>= 0.9.1),
datawizard (>= 0.5.0),
insight (>= 0.18.2),
parameters (>= 0.18.2),
performance (>= 0.9.2),
datawizard (>= 0.5.1),
stats,
utils
Suggests:
Expand Down
2 changes: 1 addition & 1 deletion R/convert_stat_to_anova.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
#' F_to_f(16.501, 1, 9)
#' }
#'
#' #' @examplesIf require(lmerTest)
#' #' @examplesIf require(emmeans)
#' \donttest{
#' ## Use with emmeans based contrasts
#' ## --------------------------------
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The goal of this package is to provide utilities to work with indices of effect

[![CRAN](https://www.r-pkg.org/badges/version/effectsize)](https://cran.r-project.org/package=effectsize/)
[![effectsize status badge](https://easystats.r-universe.dev/badges/effectsize/)](https://easystats.r-universe.dev/)
[![R-check](https://github.com/easystats/effectsize/workflows/R-check/badge.svg/)](https://github.com/easystats/effectsize/actions/)
[![R-CMD-check](https://github.com/easystats/effectsize/workflows/R-CMD-check/badge.svg?branch=main)](https://github.com/easystats/effectsize/actions)
[![pkgdown](https://github.com/easystats/effectsize/workflows/pkgdown/badge.svg/)](https://github.com/easystats/effectsize/actions/)
[![Codecov test coverage](https://codecov.io/gh/easystats/effectsize/branch/main/graph/badge.svg/)](https://app.codecov.io/gh/easystats/effectsize?branch=main/)

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![downloads](https://cranlogs.r-pkg.org/badges/effectsize)](https://cran.r-project.org/package=effectsize/)
[![total](https://cranlogs.r-pkg.org/badges/grand-total/effectsize)](https://cran.r-project.org/package=effectsize/)
[![status](https://tinyverse.netlify.com/badge/effectsize/)](https://CRAN.R-project.org/package=effectsize/)
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)

***Significant is just not enough!***

Expand All @@ -17,7 +18,7 @@ conversion of indices such as Cohen’s *d*, *r*, odds-ratios, etc.
[![CRAN](https://www.r-pkg.org/badges/version/effectsize)](https://cran.r-project.org/package=effectsize/)
[![effectsize status
badge](https://easystats.r-universe.dev/badges/effectsize/)](https://easystats.r-universe.dev/)
[![R-check](https://github.com/easystats/effectsize/workflows/R-check/badge.svg/)](https://github.com/easystats/effectsize/actions/)
[![R-CMD-check](https://github.com/easystats/effectsize/workflows/R-CMD-check/badge.svg?branch=main)](https://github.com/easystats/effectsize/actions)
[![pkgdown](https://github.com/easystats/effectsize/workflows/pkgdown/badge.svg/)](https://github.com/easystats/effectsize/actions/)
[![Codecov test
coverage](https://codecov.io/gh/easystats/effectsize/branch/main/graph/badge.svg/)](https://app.codecov.io/gh/easystats/effectsize?branch=main/)
Expand All @@ -29,7 +30,7 @@ CRAN:
install.packages("effectsize")
```

Or you can install the latest development version `0.7.0.1` from
Or you can install the latest development version `0.7.0.9999` from
[*R-universe*](https://easystats.r-universe.dev):

``` r
Expand Down
2 changes: 1 addition & 1 deletion man/F_to_eta2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b9d3149

Please sign in to comment.