Skip to content

Commit

Permalink
Update GHA checkout to v4 + update R CMD check workflow + formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMc1089 committed May 17, 2024
1 parent a0c99c0 commit 400e325
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 29 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
RENV_PATHS_ROOT: ~/.local/share/renv

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand All @@ -30,21 +30,12 @@ jobs:
with:
extra-packages: rcmdcheck

- uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
global: true
token: '${{ secrets.GITHUB_TOKEN }}'

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
15 changes: 1 addition & 14 deletions .github/workflows/gitleaks.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
name: gitleaks-action

on: [pull_request, push, workflow_dispatch]

jobs:

scan:

name: gitleaks-action

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3

- uses: actions/checkout@v4
with:

fetch-depth: 0

- run: wget -O .gitleaks.toml https://raw.githubusercontent.com/nhsbsa-data-analytics/nhsbsaShinyR/main/gitleaks.toml

- uses: gitleaks/gitleaks-action@v2

env:

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-utils_review.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test_that("md_to_word generates expected Word doc", {

# Due to how officer::read_docx works, we expect there to always be
# differences in the package_dir and doc_properties$data.
# Also, when run on github CI, there are small differences in the Word doc
# Also, when run on github CI, there are small differences in the Word doc
# generated, due to the Windows OS being Windows Server.
expected_differences <- ifelse(testthat:::on_ci(), 48, 2)

Expand Down

0 comments on commit 400e325

Please sign in to comment.