Skip to content

Commit

Permalink
June 2022 8.1 update (#34)
Browse files Browse the repository at this point in the history
* Increment version number

* Increment version number

* Increment version number

* Use `{cli}` for errors and warnings.

Recommended over using rlang directly and provides for even nicer formatting.

* Use tidy dependencies

* Add stable badge

* Use `{pkgdown}`

* Update GH actions

* Add GitHub pages link to _pkgdown.yml

* Remove (one of the) slow tests for `get_anon_chi`

* Set the test order so that the slow tests are started first

This should speed up the overall running of the tests

* Use Roxygen 7.2

* Add PHS as the Copy Right Holder

* Bump dependency versions

* Remove spurious line from NEWS

* document

* Split out checks for files existing from the tests on the file path function.

* use `expect_named`

* Use `skip_on_ci` from testthat.

Hopefully this will mean covr will work and that we can use R CMD CHK

* Replace with new example actions

* Add some CI actions

* Use alternate action for commit

* Only need to check 3.5 and 3.6

* Add CI badges

* Some tweaks and re-ordering of the readme

* Render `README.md` after changes to the `.Rmd` version (GitHub action)

* Update README.Rmd

* Update test-coverage.yaml

* Update R-CMD-check.yaml

* Updates for new variables (Home Care costs)

* Increment version number

Co-authored-by: Moohan <[email protected]>
  • Loading branch information
Moohan and Moohan authored Jun 10, 2022
1 parent 81cf743 commit 2512e22
Show file tree
Hide file tree
Showing 46 changed files with 511 additions and 224 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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: [production]
pull_request:
branches: [production, development]

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: ubuntu-latest, r: '3.6'}
- {os: ubuntu-latest, r: '3.5'}

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

steps:
- uses: actions/checkout@v2

- 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
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
62 changes: 0 additions & 62 deletions .github/workflows/check-code.yaml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/document.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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:
paths: ["R/**"]
pull_request:
paths: ["R/**"]

name: Document

jobs:
document:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0

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

- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::roxygen2
needs: roxygen2

- name: Document
run: roxygen2::roxygenise()
shell: Rscript {0}

- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update documentation (GitHub action)
file_pattern: man/* NAMESPACE
30 changes: 30 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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: [production]
pull_request:
branches: [production]

name: lint

jobs:
lint:
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::lintr
needs: lint

- name: Lint
run: lintr::lint_package()
shell: Rscript {0}
46 changes: 46 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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: [production]
pull_request:
branches: [production]
release:
types: [published]
workflow_dispatch:

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

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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
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
2 changes: 1 addition & 1 deletion .github/workflows/render-README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
name: Render README

jobs:
build:
render:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 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:
paths: ["**.[rR]", "**.[rR]md", "**.[rR]markdown", "**.[rR]nw"]
pull_request:
paths: ["**.[rR]", "**.[rR]md", "**.[rR]markdown", "**.[rR]nw"]

name: Style

jobs:
style:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0

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

- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::styler
needs: styler

- name: Enable styler cache
run: styler::cache_activate()
shell: Rscript {0}

- name: Determine cache location
id: styler-location
run: |
cat(
"##[set-output name=location;]",
styler::cache_info(format = "tabular")$location,
"\n",
sep = ""
)
shell: Rscript {0}

- name: Cache styler
uses: actions/cache@v2
with:
path: ${{ steps.styler-location.outputs.location }}
key: ${{ runner.os }}-styler-${{ github.sha }}
restore-keys: |
${{ runner.os }}-styler-
${{ runner.os }}-
- name: Style
run: styler::style_pkg(filetype = c(".R", ".Rmd", ".Rmarkdown", ".Rnw"))
shell: Rscript {0}

- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Style with {styler} (GitHub action)
31 changes: 31 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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: [production]
pull_request:
branches: [production, development]

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(quiet = FALSE)
shell: Rscript {0}
Loading

0 comments on commit 2512e22

Please sign in to comment.