From ce3b5b471d7484435b2a440260f670dc5b232083 Mon Sep 17 00:00:00 2001 From: walkowif <59475134+walkowif@users.noreply.github.com> Date: Fri, 13 Oct 2023 18:58:39 +0200 Subject: [PATCH 01/33] Change R linter (#188) --- .github/workflows/linter.yaml | 45 +++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index 16590d249..a5271d0b7 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -21,6 +21,11 @@ on: required: false type: boolean default: true + lint-all-files: + description: Lint all files every time + default: false + required: false + type: boolean concurrency: group: lint-${{ github.event.pull_request.number || github.ref }} @@ -75,6 +80,42 @@ jobs: VALIDATE_DOCKERFILE: true VALIDATE_MARKDOWN: true MARKDOWN_CONFIG_FILE: .markdownlint.yaml - VALIDATE_R: true VALIDATE_YAML: true - LINTR_ERROR_ON_LINT: ${{ inputs.lintr_error_on_lint }} + + lint-r-code: + name: Lint R code ๐Ÿงถ + runs-on: ubuntu-latest + if: > + !contains(github.event.commits[0].message, '[skip linter]') + && github.event.pull_request.draft == false + container: + image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest + steps: + - name: Checkout repo ๐Ÿ›Ž + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Changed files ๐Ÿ–‹๏ธ + id: files + uses: Ana06/get-changed-files@v2.2.0 + with: + format: 'json' + filter: '*' + + - name: Lint ๐Ÿงถ + run: | + exclusions_list <- NULL + if (!identical("${{ inputs.lint-all-files }}", "true")) { + changed_files <- jsonlite::fromJSON('${{ steps.files.outputs.added_modified }}') + all_files <- list.files(recursive = TRUE) + exclusions_list <- as.list(setdiff(all_files, changed_files)) + } + lints <- lintr::lint_package(exclusions = exclusions_list) + if (length(lints) > 0L) { + print(lints) + if (identical("${{ inputs.lintr_error_on_lint }}", "true")) { + stop("Lints detected. Please review and adjust code according to the comments provided.", call. = FALSE) + } + } + shell: Rscript {0} From a2f520d2b3411ed914bc5c93e7a2e2550438c829 Mon Sep 17 00:00:00 2001 From: walkowif <59475134+walkowif@users.noreply.github.com> Date: Mon, 16 Oct 2023 14:13:06 +0200 Subject: [PATCH 02/33] Update status checks to use latest image (#189) https://github.com/insightsengineering/idr-tasks/issues/676 --- .github/workflows/audit.yaml | 2 +- .github/workflows/bioccheck.yaml | 2 +- .github/workflows/branch-cleanup.yaml | 2 +- .github/workflows/build-check-install.yaml | 2 +- .github/workflows/linter.yaml | 2 +- .github/workflows/pkgdown.yaml | 2 +- .github/workflows/roxygen.yaml | 2 +- .github/workflows/spelling.yaml | 2 +- .github/workflows/style.yaml | 2 +- .github/workflows/test-coverage.yaml | 4 ++-- .github/workflows/validation.yaml | 2 +- .github/workflows/verdepcheck.yaml | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml index 844a015a8..81ca89d24 100644 --- a/.github/workflows/audit.yaml +++ b/.github/workflows/audit.yaml @@ -30,7 +30,7 @@ jobs: audit: runs-on: ubuntu-latest container: - image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest + image: ghcr.io/insightsengineering/rstudio:latest name: oysteR scan ๐Ÿฆช if: > !contains(github.event.commits[0].message, '[skip audit]') diff --git a/.github/workflows/bioccheck.yaml b/.github/workflows/bioccheck.yaml index 326389a1a..03aa5d19c 100644 --- a/.github/workflows/bioccheck.yaml +++ b/.github/workflows/bioccheck.yaml @@ -64,7 +64,7 @@ jobs: fail-fast: false matrix: config: - - image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17 + - image: ghcr.io/insightsengineering/rstudio tag: latest name: ${{ matrix.config.image }}, version ${{ matrix.config.tag }} runs-on: ubuntu-latest diff --git a/.github/workflows/branch-cleanup.yaml b/.github/workflows/branch-cleanup.yaml index c018652e3..4a11ecb35 100644 --- a/.github/workflows/branch-cleanup.yaml +++ b/.github/workflows/branch-cleanup.yaml @@ -21,7 +21,7 @@ jobs: name: Branch Cleanup ๐Ÿƒ runs-on: ubuntu-latest container: - image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest + image: ghcr.io/insightsengineering/rstudio:latest steps: - name: Setup token ๐Ÿ”‘ diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index 6062114a9..dc882e339 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -172,7 +172,7 @@ jobs: fail-fast: false matrix: config: - - image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17 + - image: ghcr.io/insightsengineering/rstudio tag: latest name: ${{ matrix.config.image }}, version ${{ matrix.config.tag }} runs-on: ubuntu-latest diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index a5271d0b7..9932dc95f 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -89,7 +89,7 @@ jobs: !contains(github.event.commits[0].message, '[skip linter]') && github.event.pull_request.draft == false container: - image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest + image: ghcr.io/insightsengineering/rstudio:latest steps: - name: Checkout repo ๐Ÿ›Ž uses: actions/checkout@v3 diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 7a51a803b..4f263880c 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -124,7 +124,7 @@ jobs: !contains(github.event.commits[0].message, '[skip docs]') && github.event.pull_request.draft == false container: - image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest + image: ghcr.io/insightsengineering/rstudio:latest # Only one job can publish to gh-pages branch concurrently. concurrency: group: ghpages diff --git a/.github/workflows/roxygen.yaml b/.github/workflows/roxygen.yaml index 956d193e5..6a7c363f6 100644 --- a/.github/workflows/roxygen.yaml +++ b/.github/workflows/roxygen.yaml @@ -59,7 +59,7 @@ jobs: !contains(github.event.commits[0].message, '[skip roxygen]') && github.event.pull_request.draft == false container: - image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest + image: ghcr.io/insightsengineering/rstudio:latest steps: - name: Setup token ๐Ÿ”‘ diff --git a/.github/workflows/spelling.yaml b/.github/workflows/spelling.yaml index d5d959969..e9681c550 100644 --- a/.github/workflows/spelling.yaml +++ b/.github/workflows/spelling.yaml @@ -38,7 +38,7 @@ jobs: !contains(github.event.commits[0].message, '[skip spelling]') && github.event.pull_request.draft == false container: - image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest + image: ghcr.io/insightsengineering/rstudio:latest steps: - name: Setup token ๐Ÿ”‘ diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index 357a9afdd..227533f7f 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -39,7 +39,7 @@ jobs: !contains(github.event.commits[0].message, '[skip style]') && github.event.pull_request.draft == false container: - image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest + image: ghcr.io/insightsengineering/rstudio:latest steps: - name: Checkout Code ๐Ÿ›Ž diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 7fe3b51e3..95ead7298 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -101,7 +101,7 @@ jobs: !contains(github.event.commits[0].message, '[skip coverage]') && github.event.pull_request.draft == false container: - image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest + image: ghcr.io/insightsengineering/rstudio:latest outputs: publish-coverage-html-report: ${{ steps.coverage-output.outputs.coverage-upload }} current-branch-or-tag: ${{ steps.current-branch-or-tag.outputs.ref-name }} @@ -303,7 +303,7 @@ jobs: && github.event.pull_request.draft == false && contains(inputs.enable-covtracer, 'true') container: - image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest + image: ghcr.io/insightsengineering/rstudio:latest steps: - name: Get branch names ๐ŸŒฟ id: branch-name diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index cec271643..64241ddc2 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -56,7 +56,7 @@ jobs: !contains(github.event.commits[0].message, '[skip validation]') && github.event.pull_request.draft == false container: - image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest + image: ghcr.io/insightsengineering/rstudio:latest permissions: contents: write packages: write diff --git a/.github/workflows/verdepcheck.yaml b/.github/workflows/verdepcheck.yaml index 5d89a0cef..d589557d8 100644 --- a/.github/workflows/verdepcheck.yaml +++ b/.github/workflows/verdepcheck.yaml @@ -47,7 +47,7 @@ jobs: !contains(github.event.commits[0].message, '[skip dependency-test]') && github.event.pull_request.draft == false container: - image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest + image: ghcr.io/insightsengineering/rstudio:latest steps: - name: Setup token ๐Ÿ”‘ From 4711b6e614022613bec547aacdcfeec856716e0c Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Mon, 16 Oct 2023 08:57:27 -0500 Subject: [PATCH 03/33] Do not rebuild R package for PRs (#190) This takes a long time for some packages. No need to rebuild for PRs. --- .github/workflows/build-check-install.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index dc882e339..8477cf80d 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -711,8 +711,9 @@ jobs: - name: Rebuild R package ๐Ÿ— if: > - inputs.disable-unit-test-reports != 'true' || - startsWith(github.ref, 'refs/tags/v') + (inputs.disable-unit-test-reports != 'true' || + startsWith(github.ref, 'refs/tags/v')) && + github.event_name != 'pull_request' run: | # Undo changes to DESCRIPTION and tests/testthat.R git checkout DESCRIPTION From c5885415ba10250ab9496d3adc491815cef5edfe Mon Sep 17 00:00:00 2001 From: walkowif <59475134+walkowif@users.noreply.github.com> Date: Fri, 27 Oct 2023 14:23:13 +0200 Subject: [PATCH 04/33] Don't fail testing coverage on warnings (#191) --- .github/workflows/test-coverage.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 95ead7298..da4f1016f 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -249,10 +249,6 @@ jobs: cat("__________FULL OUTPUT__________") writeLines(readLines(error_file)) } - }, - warning = function(w) { - message("Warnings generated during coverage analysis:") - print(w) } ) covr_html <- "coverage-report.html" From 65b78d6f3ef241f635b14c21ca48a8bc1ab78b07 Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Mon, 30 Oct 2023 08:12:55 -0500 Subject: [PATCH 05/33] Update cran-status.yaml Signed-off-by: cicdguy <26552821+cicdguy@users.noreply.github.com> --- .github/workflows/cran-status.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cran-status.yaml b/.github/workflows/cran-status.yaml index 011448665..3458a0d3a 100644 --- a/.github/workflows/cran-status.yaml +++ b/.github/workflows/cran-status.yaml @@ -36,7 +36,7 @@ jobs: image: rocker/tidyverse:latest steps: - name: Run CRAN Status Action - uses: insightsengineering/cran-status-action@main + uses: insightsengineering/cran-status-action@v1 with: statuses: "${{ inputs.statuses }}" issue-assignees: "${{ inputs.issue-assignees }}" From e3d260880029618d4817ce9de532013958f85951 Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Wed, 8 Nov 2023 08:51:12 -0600 Subject: [PATCH 06/33] Add an exclude option for spellcheck workflows (#193) Add the ability to exclude files, filetypes for the spellcheck workflow. Signed-off-by: cicdguy <26552821+cicdguy@users.noreply.github.com> --- .github/workflows/spelling.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/spelling.yaml b/.github/workflows/spelling.yaml index e9681c550..94a9a5a78 100644 --- a/.github/workflows/spelling.yaml +++ b/.github/workflows/spelling.yaml @@ -25,6 +25,11 @@ on: required: false type: string default: "." + exclude: + description: Comma separated list of files or folders to exclude from spellcheck. Accepts globs. + type: string + default: "inst/extdata/*" + required: false concurrency: group: spelling-${{ github.event.pull_request.number || github.ref }} @@ -67,7 +72,7 @@ jobs: - name: Run Spellcheck ๐Ÿ‘Ÿ uses: insightsengineering/r-spellcheck-action@v2 with: - exclude: inst/extdata/* + exclude: ${{ inputs.exclude }} path: ${{ env.package_subdirectory }} - name: Clean up WORDLIST ๐Ÿงผ From 39ecacae85126d8e3cbc2b0c728ce8ff35c19843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Mon, 13 Nov 2023 16:42:34 +0100 Subject: [PATCH 07/33] Fix vbump v2 (#194) # Pull Request Fix issue with `.pre-commit-config.yaml` file --- .github/workflows/version-bump.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/version-bump.yaml b/.github/workflows/version-bump.yaml index 0d4187446..cfa681ad8 100644 --- a/.github/workflows/version-bump.yaml +++ b/.github/workflows/version-bump.yaml @@ -138,6 +138,9 @@ jobs: else FILE_PATTERN="${{ inputs.package-subdirectory }}/NEWS.md ${{ inputs.package-subdirectory }}/DESCRIPTION" fi + if [[ '${{ steps.precommit-config-exists.outputs.files_exists }}' == 'true' ]]; then + FILE_PATTERN="$FILE_PATTERN .pre-commit-config.yaml" + fi echo "file-pattern=$FILE_PATTERN" >> $GITHUB_OUTPUT shell: bash @@ -146,7 +149,7 @@ jobs: uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: "[skip actions] Bump version to ${{ env.NEW_PKG_VERSION }}" - file_pattern: "${{ steps.file-pattern.outputs.file-pattern }} .pre-commit-config.yaml" + file_pattern: "${{ steps.file-pattern.outputs.file-pattern }}" commit_user_name: insights-engineering-bot commit_user_email: >- 68416928+insights-engineering-bot@users.noreply.github.com From befd8bef586ac87e8696c2e80660610c327e822b Mon Sep 17 00:00:00 2001 From: walkowif <59475134+walkowif@users.noreply.github.com> Date: Tue, 14 Nov 2023 14:46:17 +0100 Subject: [PATCH 08/33] Fix a bug in JUnit XML comparison part (#195) --- .github/workflows/build-check-install.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index 8477cf80d..c7d934def 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -625,7 +625,7 @@ jobs: env.junit_xml_comparison == 'true' && env.junit_xml_comparison_result_method == 'comment' && !github.event.pull_request.head.repo.fork && - github.event_name == 'pull-request' + github.event_name == 'pull_request' uses: marocchino/sticky-pull-request-comment@v2 with: header: markdown-table @@ -638,7 +638,7 @@ jobs: env.junit_xml_comparison == 'true' && env.junit_xml_comparison_result_method == 'artifact' && !github.event.pull_request.head.repo.fork && - github.event_name == 'pull-request' + github.event_name == 'pull_request' uses: actions/upload-artifact@v3 with: path: output-artifact.md From 2dd47db3b8a324c8c9791d1e9a7d359594f4168a Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Tue, 14 Nov 2023 10:33:08 -0600 Subject: [PATCH 09/33] Do not update NEWS file version if development version is set (#196) Do not update NEWS file version if development version is set, which is valid. --- .github/workflows/version-bump.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/version-bump.yaml b/.github/workflows/version-bump.yaml index cfa681ad8..9e3a73e00 100644 --- a/.github/workflows/version-bump.yaml +++ b/.github/workflows/version-bump.yaml @@ -78,16 +78,21 @@ jobs: then { git config --global --add safe.directory $(pwd) DESC_VERSION=$(R --slave -e 'cat(paste(desc::desc_get_version()))') - NEWS_VERSION=$(awk '/^#+ /{print $3; exit}' NEWS.md) + NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md) FIRST_NEWS_LINE=$(head -1 NEWS.md) if [ "${{ inputs.vbump-after-release }}" == "true" ]; then # Add a new section with the released version that will be vbumped below. printf "$FIRST_NEWS_LINE\n\n" | cat - NEWS.md > temp-news.md mv temp-news.md NEWS.md fi - # Replace only the first occurence of $NEWS_VERSION. - sed -i "0,/$NEWS_VERSION/s/$NEWS_VERSION/$DESC_VERSION/" NEWS.md - NEWS_VERSION=$(awk '/^#+ /{print $3; exit}' NEWS.md) + # Replace only the first occurence of $NEWS_VERSION, + # but only if it's not already set to (development version) + if [ "$NEWS_VERSION" != "(development version)" ] + then { + sed -i "0,/$NEWS_VERSION/s/$NEWS_VERSION/$DESC_VERSION/" NEWS.md + } + fi + NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md) echo "Updated NEWS.md version: $NEWS_VERSION" if (test $DESC_VERSION != $NEWS_VERSION ); then echo "๐Ÿ™ˆ Updated NEWS.md and DESCRIPTION have different versions!" @@ -133,7 +138,7 @@ jobs: - name: Set file pattern to commit โš™๏ธ id: file-pattern run: | - if [[ "${{ inputs.package-subdirectory }}" == "." ]]; then + if [[ "${{ inputs.package-subdirectory }}" == "." || "${{ inputs.package-subdirectory }}" == "" ]]; then FILE_PATTERN="NEWS.md DESCRIPTION" else FILE_PATTERN="${{ inputs.package-subdirectory }}/NEWS.md ${{ inputs.package-subdirectory }}/DESCRIPTION" From a8a4f652114ae3f220d0965ed39ba9bec7cb46d7 Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Wed, 15 Nov 2023 18:10:55 -0600 Subject: [PATCH 10/33] Do not fail version check if development version is set (#197) Do not fail version check if development version is set --------- Signed-off-by: cicdguy <26552821+cicdguy@users.noreply.github.com> --- .github/workflows/version-bump.yaml | 13 +++---------- .github/workflows/version.yaml | 26 ++++++++++++++++++-------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/version-bump.yaml b/.github/workflows/version-bump.yaml index 9e3a73e00..02c4798ee 100644 --- a/.github/workflows/version-bump.yaml +++ b/.github/workflows/version-bump.yaml @@ -77,8 +77,8 @@ jobs: if [ -f NEWS.md ] then { git config --global --add safe.directory $(pwd) - DESC_VERSION=$(R --slave -e 'cat(paste(desc::desc_get_version()))') - NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md) + DESC_VERSION=$(R --slave -e 'cat(paste(desc::desc_get_version()))' | tr -d '\n') + NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md | tr -d '\n') FIRST_NEWS_LINE=$(head -1 NEWS.md) if [ "${{ inputs.vbump-after-release }}" == "true" ]; then # Add a new section with the released version that will be vbumped below. @@ -87,18 +87,11 @@ jobs: fi # Replace only the first occurence of $NEWS_VERSION, # but only if it's not already set to (development version) - if [ "$NEWS_VERSION" != "(development version)" ] + if [ "${NEWS_VERSION}" != "(development version)" ] then { sed -i "0,/$NEWS_VERSION/s/$NEWS_VERSION/$DESC_VERSION/" NEWS.md } fi - NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md) - echo "Updated NEWS.md version: $NEWS_VERSION" - if (test $DESC_VERSION != $NEWS_VERSION ); then - echo "๐Ÿ™ˆ Updated NEWS.md and DESCRIPTION have different versions!" - echo "Please ensure that the versions in the NEWS.md and DESCRIPTION are the same ๐Ÿ™" - exit 1 - fi echo "NEW_PKG_VERSION=${DESC_VERSION}" >> $GITHUB_ENV } fi diff --git a/.github/workflows/version.yaml b/.github/workflows/version.yaml index 1a18fb15d..c8b3a429e 100644 --- a/.github/workflows/version.yaml +++ b/.github/workflows/version.yaml @@ -39,17 +39,27 @@ jobs: - name: NEWS.md and DESCRIPTION Version check ๐Ÿ run: | - DESC_VERSION=$(awk -F: '/Version:/{gsub(/[ ]+/,"") ; print $2}' DESCRIPTION) - NEWS_VERSION=$(awk '/^#+ /{print $3; exit}' NEWS.md) + DESC_VERSION=$(awk -F: '/Version:/{gsub(/[ ]+/,"") ; print $2}' DESCRIPTION | tr -d '\n') + NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md | tr -d '\n') + DESC_DEV_VERSION=$(echo $DESC_VERSION | awk -F '.' '{print $NF}') echo "NEWS.md version: $NEWS_VERSION" echo "DESCRIPTION version: $DESC_VERSION" - if (test $DESC_VERSION = $NEWS_VERSION ); then - echo "NEWS.md and DESCRIPTION have the same version" - else - echo "๐Ÿ™ˆ NEWS.md and DESCRIPTION have different versions!" - echo "๐Ÿ™ Please fix this." - exit 1 + if test $DESC_VERSION = $NEWS_VERSION + then { + echo "NEWS.md and DESCRIPTION have the same version ๐ŸŽ‰" + exit 0 + } fi + if [[ $DESC_DEV_VERSION -ge 9000 && "${NEWS_VERSION}" == "(development version)" ]] + then { + echo "NEWS.md and DESCRIPTION file versions are okay as package is in development mode." + echo "All is okay ๐Ÿ†—" + exit 0 + } + fi + echo "๐Ÿ™ˆ NEWS.md and DESCRIPTION have different versions!" + echo "๐Ÿ™ Please fix this." + exit 1 shell: bash working-directory: ${{ inputs.package-subdirectory }} From c47e2aa2e04847450f811a77553972a197aa698d Mon Sep 17 00:00:00 2001 From: cicdguy Date: Thu, 16 Nov 2023 00:11:51 +0000 Subject: [PATCH 11/33] [skip actions] Bump version to 0.1.0.9131 --- .pre-commit-config.yaml | 8 ++++---- DESCRIPTION | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0229cbf49..328da8c57 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ # R specific hooks: https://github.com/lorenzwalthert/precommit repos: - repo: https://github.com/lorenzwalthert/precommit - rev: v0.3.2.9013 + rev: v0.3.2.9025 hooks: - id: style-files args: [--style_pkg=styler, --style_fun=tidyverse_style] @@ -47,11 +47,11 @@ repos: - id: no-browser-statement - id: deps-in-desc - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.9-for-vscode + rev: v3.1.0 hooks: - id: prettier - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-added-large-files args: ["--maxkb=200"] @@ -77,6 +77,6 @@ repos: files: '\.Rhistory|\.RData|\.Rds|\.rds$' # `exclude: ` to allow committing specific files. - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.35.0 + rev: v0.37.0 hooks: - id: markdownlint diff --git a/DESCRIPTION b/DESCRIPTION index ba39c2be0..9cb07b4a5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: r.pkg.template Title: R Package Template -Version: 0.1.0.9130 -Date: 2023-07-05 +Version: 0.1.0.9131 +Date: 2023-11-16 Authors@R: person("insightsengineering", , , "insightsengineering@example.com", role = c("aut", "cre")) Description: R package template with GitHub Actions workflows included. From af8c3ea8da20c083c55fffef123eb164c4969999 Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:00:21 -0600 Subject: [PATCH 12/33] Change default committer information (#198) Replace @insights-engineering-bot with @github-actions for auto-commits. Also bump all actions. --- .github/workflows/audit.yaml | 2 +- .github/workflows/bioccheck.yaml | 4 ++-- .github/workflows/branch-cleanup.yaml | 2 +- .github/workflows/build-check-install.yaml | 16 ++++++++-------- .github/workflows/gitleaks.yaml | 6 +++--- .github/workflows/grammar.yaml | 8 ++++---- .github/workflows/licenses.yaml | 2 +- .github/workflows/links.yaml | 2 +- .github/workflows/linter.yaml | 4 ++-- .github/workflows/pkgdown.yaml | 12 ++++++------ .github/workflows/release.yaml | 4 ++-- .github/workflows/roxygen.yaml | 6 +++--- .github/workflows/spelling.yaml | 8 ++++---- .github/workflows/style.yaml | 6 +++--- .github/workflows/test-coverage.yaml | 12 ++++++------ .github/workflows/validation.yaml | 4 ++-- .github/workflows/verdepcheck.yaml | 2 +- .github/workflows/version-bump.yaml | 16 ++++++++-------- .github/workflows/version.yaml | 10 +++++----- NEWS.md | 2 +- 20 files changed, 64 insertions(+), 64 deletions(-) diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml index 81ca89d24..b9882d8c5 100644 --- a/.github/workflows/audit.yaml +++ b/.github/workflows/audit.yaml @@ -37,7 +37,7 @@ jobs: && github.event.pull_request.draft == false steps: - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Normalize inputs ๐Ÿ› ๏ธ id: normalizer diff --git a/.github/workflows/bioccheck.yaml b/.github/workflows/bioccheck.yaml index 03aa5d19c..4284a8e16 100644 --- a/.github/workflows/bioccheck.yaml +++ b/.github/workflows/bioccheck.yaml @@ -90,7 +90,7 @@ jobs: - name: Get branch names ๐ŸŒฟ id: branch-name - uses: tj-actions/branch-names@v6 + uses: tj-actions/branch-names@v7 - name: Checkout repo (PR) ๐Ÿ›Ž uses: actions/checkout@v3 @@ -101,7 +101,7 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: github.event_name != 'pull_request' with: ref: ${{ steps.branch-name.outputs.head_ref_branch }} diff --git a/.github/workflows/branch-cleanup.yaml b/.github/workflows/branch-cleanup.yaml index 4a11ecb35..f9b09b25a 100644 --- a/.github/workflows/branch-cleanup.yaml +++ b/.github/workflows/branch-cleanup.yaml @@ -37,7 +37,7 @@ jobs: shell: bash - name: Checkout Code ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cleanup branches ๐ŸŒฟ uses: phpdocker-io/github-actions-delete-abandoned-branches@v1 diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index c7d934def..3b4418dd4 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -203,14 +203,14 @@ jobs: - name: Get branch names ๐ŸŒฟ id: branch-name - uses: tj-actions/branch-names@v6 + uses: tj-actions/branch-names@v7 - name: Checkout gh-pages ๐Ÿ›Ž if: >- inputs.publish-unit-test-report-gh-pages == true && github.event_name != 'pull_request' id: checkout-gh-pages - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: gh-pages path: gh-pages @@ -275,10 +275,10 @@ jobs: if: >- inputs.publish-unit-test-report-gh-pages == true && github.event_name != 'pull_request' - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 id: npm-cache with: - node-version: 18 + node-version: 20 - name: Install xunit-viewer โš™๏ธ if: >- @@ -289,7 +289,7 @@ jobs: shell: bash - name: Checkout repo (PR) ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: github.event_name == 'pull_request' with: ref: ${{ steps.branch-name.outputs.head_ref_branch }} @@ -297,7 +297,7 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: github.event_name != 'pull_request' with: ref: ${{ steps.branch-name.outputs.head_ref_branch }} @@ -443,7 +443,7 @@ jobs: - name: Fetch report from ${{ env.junit_xml_storage }} โคต๏ธ if: env.junit_xml_comparison == 'true' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ${{ env.junit_xml_storage }} fetch-depth: 0 @@ -812,7 +812,7 @@ jobs: && github.event.pull_request.draft == false steps: - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get package build filename ๐Ÿ“ฆ run: | diff --git a/.github/workflows/gitleaks.yaml b/.github/workflows/gitleaks.yaml index a00802d08..7b791fe0a 100644 --- a/.github/workflows/gitleaks.yaml +++ b/.github/workflows/gitleaks.yaml @@ -40,7 +40,7 @@ jobs: && github.event.pull_request.draft == false steps: - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download and install gitleaks ๐Ÿ’ง run: | @@ -55,7 +55,7 @@ jobs: (echo "Error moving gitleaks for /usr/bin" && exit 1) shell: bash env: - GITLEAKS_VERSION: "8.16.3" + GITLEAKS_VERSION: "8.18.1" - name: Run gitleaks โ˜” run: gitleaks -v detect --no-git ${{ inputs.additional-args }} --source . @@ -70,7 +70,7 @@ jobs: && inputs.check-for-pii == true steps: - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/grammar.yaml b/.github/workflows/grammar.yaml index 46788fe12..07ae221b4 100644 --- a/.github/workflows/grammar.yaml +++ b/.github/workflows/grammar.yaml @@ -40,7 +40,7 @@ jobs: steps: - name: Checkout Code ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Restore npm cache ๐Ÿ’ฐ uses: actions/cache@v3 @@ -54,7 +54,7 @@ jobs: uses: actions/setup-node@v3 id: npm-cache with: - node-version: 18 + node-version: 20 - name: Install write-good and deps โฌ if: steps.npm-cache.outputs.cache-hit != 'true' @@ -63,7 +63,7 @@ jobs: - name: Get changed files ๐Ÿ—ž id: changed-files - uses: tj-actions/changed-files@v37 + uses: tj-actions/changed-files@v40 with: separator: "," files: | @@ -75,7 +75,7 @@ jobs: **.md - name: Run write-good ๐Ÿƒโ€โ™€๏ธ - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/licenses.yaml b/.github/workflows/licenses.yaml index 50572612a..4daa53ea1 100644 --- a/.github/workflows/licenses.yaml +++ b/.github/workflows/licenses.yaml @@ -34,7 +34,7 @@ jobs: && github.event.pull_request.draft == false steps: - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Generate license report ๐Ÿ“œ uses: insightsengineering/r-license-report@v1 diff --git a/.github/workflows/links.yaml b/.github/workflows/links.yaml index 4e763bc3f..3a1e664ee 100644 --- a/.github/workflows/links.yaml +++ b/.github/workflows/links.yaml @@ -35,7 +35,7 @@ jobs: && github.event.pull_request.draft == false steps: - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check URLs in docs ๐Ÿ”ฌ uses: lycheeverse/lychee-action@v1.8.0 diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index 9932dc95f..9fa948217 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -40,7 +40,7 @@ jobs: && github.event.pull_request.draft == false steps: - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -92,7 +92,7 @@ jobs: image: ghcr.io/insightsengineering/rstudio:latest steps: - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 4f263880c..5480e3f31 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -143,7 +143,7 @@ jobs: - name: Get branch names ๐ŸŒฟ id: branch-name - uses: tj-actions/branch-names@v6 + uses: tj-actions/branch-names@v7 - name: Get current branch or tag ๐Ÿท๏ธ id: current-branch-or-tag @@ -158,7 +158,7 @@ jobs: shell: bash - name: Checkout repo (PR) ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: github.event_name == 'pull_request' with: ref: ${{ steps.branch-name.outputs.head_ref_branch }} @@ -166,7 +166,7 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: github.event_name != 'pull_request' with: ref: ${{ steps.branch-name.outputs.head_ref_branch }} @@ -227,7 +227,7 @@ jobs: - name: Checkout gh-pages ๐Ÿ›Ž if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'push' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: "gh-pages" fetch-depth: 0 @@ -284,7 +284,7 @@ jobs: && !contains(github.event.commits[0].message, '[skip docs]') steps: - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ${{ github.event.repository.name }} ref: "gh-pages" @@ -308,7 +308,7 @@ jobs: && !contains(github.event.commits[0].message, '[skip docs]') steps: - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download artifact โฌ uses: actions/download-artifact@v3 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5280e4146..6c0bc86d0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -49,11 +49,11 @@ jobs: shell: bash - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get branch names ๐ŸŒฟ id: branch-name - uses: tj-actions/branch-names@v6 + uses: tj-actions/branch-names@v7 - name: Check if running for rc tag ๐Ÿท๏ธ id: rc-tag diff --git a/.github/workflows/roxygen.yaml b/.github/workflows/roxygen.yaml index 6a7c363f6..604b26a30 100644 --- a/.github/workflows/roxygen.yaml +++ b/.github/workflows/roxygen.yaml @@ -76,10 +76,10 @@ jobs: - name: Get branch names ๐ŸŒฟ id: branch-name - uses: tj-actions/branch-names@v6 + uses: tj-actions/branch-names@v7 - name: Checkout repo (PR) ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: github.event_name == 'pull_request' with: ref: ${{ steps.branch-name.outputs.head_ref_branch }} @@ -87,7 +87,7 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: github.event_name != 'pull_request' with: ref: ${{ steps.branch-name.outputs.head_ref_branch }} diff --git a/.github/workflows/spelling.yaml b/.github/workflows/spelling.yaml index 94a9a5a78..305a87730 100644 --- a/.github/workflows/spelling.yaml +++ b/.github/workflows/spelling.yaml @@ -59,7 +59,7 @@ jobs: shell: bash - name: Checkout Code ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ steps.github-token.outputs.token }} @@ -110,11 +110,11 @@ jobs: - name: Commit and push changes ๐Ÿ“Œ if: github.event_name == 'push' - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "[skip actions] Update WORDLIST" file_pattern: "${{ steps.file-pattern.outputs.file-pattern }}" - commit_user_name: insights-engineering-bot + commit_user_name: github-actions commit_user_email: >- - 68416928+insights-engineering-bot@users.noreply.github.com + 41898282+github-actions[bot]@users.noreply.github.com continue-on-error: true diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index 227533f7f..4ee96170f 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -43,7 +43,7 @@ jobs: steps: - name: Checkout Code ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ${{ github.event.repository.name }} fetch-depth: 0 @@ -51,7 +51,7 @@ jobs: - name: Get branch names ๐ŸŒฟ if: inputs.auto-update id: branch-name - uses: tj-actions/branch-names@v6 + uses: tj-actions/branch-names@v7 - name: Install styler ๐Ÿ‘š run: | @@ -60,7 +60,7 @@ jobs: - name: Get changed files ๐Ÿ—ž id: changed-files - uses: tj-actions/changed-files@v35 + uses: tj-actions/changed-files@v40 with: path: ${{ github.event.repository.name }} separator: "," diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index da4f1016f..f8f670441 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -123,14 +123,14 @@ jobs: - name: Get branch names ๐ŸŒฟ id: branch-name - uses: tj-actions/branch-names@v6 + uses: tj-actions/branch-names@v7 - name: Checkout gh-pages ๐Ÿ›Ž if: >- github.event_name != 'pull_request' && inputs.publish-coverage-report-gh-pages == true id: checkout-gh-pages - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: gh-pages path: gh-pages @@ -166,7 +166,7 @@ jobs: shell: bash - name: Checkout repo (PR) ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: github.event_name == 'pull_request' with: ref: ${{ steps.branch-name.outputs.head_ref_branch }} @@ -174,7 +174,7 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: github.event_name != 'pull_request' with: ref: ${{ steps.branch-name.outputs.head_ref_branch }} @@ -303,10 +303,10 @@ jobs: steps: - name: Get branch names ๐ŸŒฟ id: branch-name - uses: tj-actions/branch-names@v6 + uses: tj-actions/branch-names@v7 - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ steps.branch-name.outputs.head_ref_branch }} path: ${{ github.event.repository.name }} diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 64241ddc2..ef13ec1b0 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -75,7 +75,7 @@ jobs: shell: bash - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Normalize variables ๐Ÿ“ run: | @@ -121,7 +121,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/v') steps: - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download artifact โฌ uses: actions/download-artifact@v3 diff --git a/.github/workflows/verdepcheck.yaml b/.github/workflows/verdepcheck.yaml index d589557d8..d4d56b3c8 100644 --- a/.github/workflows/verdepcheck.yaml +++ b/.github/workflows/verdepcheck.yaml @@ -63,7 +63,7 @@ jobs: shell: bash - name: Checkout Code ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Normalize variables ๐Ÿ“ run: | diff --git a/.github/workflows/version-bump.yaml b/.github/workflows/version-bump.yaml index 02c4798ee..11faf3dc5 100644 --- a/.github/workflows/version-bump.yaml +++ b/.github/workflows/version-bump.yaml @@ -41,7 +41,7 @@ jobs: contains(github.event.head_commit.message, '[skip vbump]') ) container: - image: docker.io/rocker/tidyverse:4.3.1 + image: docker.io/rocker/tidyverse:latest steps: - name: Setup token ๐Ÿ”‘ @@ -57,7 +57,7 @@ jobs: shell: bash - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ steps.github-token.outputs.token }} @@ -77,8 +77,8 @@ jobs: if [ -f NEWS.md ] then { git config --global --add safe.directory $(pwd) - DESC_VERSION=$(R --slave -e 'cat(paste(desc::desc_get_version()))' | tr -d '\n') - NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md | tr -d '\n') + DESC_VERSION=$(R --slave -e 'cat(paste(desc::desc_get_version()))' | tr -d '\n' | xargs) + NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md | tr -d '\n' | xargs) FIRST_NEWS_LINE=$(head -1 NEWS.md) if [ "${{ inputs.vbump-after-release }}" == "true" ]; then # Add a new section with the released version that will be vbumped below. @@ -87,7 +87,7 @@ jobs: fi # Replace only the first occurence of $NEWS_VERSION, # but only if it's not already set to (development version) - if [ "${NEWS_VERSION}" != "(development version)" ] + if [ $NEWS_VERSION != "(development version)" ] then { sed -i "0,/$NEWS_VERSION/s/$NEWS_VERSION/$DESC_VERSION/" NEWS.md } @@ -110,7 +110,7 @@ jobs: steps.precommit-config-exists.outputs.files_exists == 'true' uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.12' - name: Precommit autoupdate ๐Ÿ…ฟ๏ธ if: | @@ -148,7 +148,7 @@ jobs: with: commit_message: "[skip actions] Bump version to ${{ env.NEW_PKG_VERSION }}" file_pattern: "${{ steps.file-pattern.outputs.file-pattern }}" - commit_user_name: insights-engineering-bot + commit_user_name: github-actions commit_user_email: >- - 68416928+insights-engineering-bot@users.noreply.github.com + 41898282+github-actions[bot]@users.noreply.github.com continue-on-error: true diff --git a/.github/workflows/version.yaml b/.github/workflows/version.yaml index c8b3a429e..27a6a11ee 100644 --- a/.github/workflows/version.yaml +++ b/.github/workflows/version.yaml @@ -35,12 +35,12 @@ jobs: && github.event.pull_request.draft == false steps: - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: NEWS.md and DESCRIPTION Version check ๐Ÿ run: | - DESC_VERSION=$(awk -F: '/Version:/{gsub(/[ ]+/,"") ; print $2}' DESCRIPTION | tr -d '\n') - NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md | tr -d '\n') + DESC_VERSION=$(awk -F: '/Version:/{gsub(/[ ]+/,"") ; print $2}' DESCRIPTION | tr -d '\n' | xargs) + NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md | tr -d '\n' | xargs) DESC_DEV_VERSION=$(echo $DESC_VERSION | awk -F '.' '{print $NF}') echo "NEWS.md version: $NEWS_VERSION" echo "DESCRIPTION version: $DESC_VERSION" @@ -71,12 +71,12 @@ jobs: && github.event.pull_request.draft == false steps: - name: Checkout repo ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ๐Ÿ uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: '3.12' - name: Install the regex package ๐Ÿ“ฆ uses: insightsengineering/pip-action@v2 diff --git a/NEWS.md b/NEWS.md index 857e0444c..14236bbeb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9130 +# r.pkg.template 0.1.0.9131 ### New features From 76959c96ea1d9d920cf14caa476e63dcceb1ca9a Mon Sep 17 00:00:00 2001 From: cicdguy Date: Mon, 20 Nov 2023 16:01:18 +0000 Subject: [PATCH 13/33] [skip actions] Bump version to 0.1.0.9132 --- .pre-commit-config.yaml | 2 +- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 328da8c57..9889a711b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ # R specific hooks: https://github.com/lorenzwalthert/precommit repos: - repo: https://github.com/lorenzwalthert/precommit - rev: v0.3.2.9025 + rev: v0.3.2.9027 hooks: - id: style-files args: [--style_pkg=styler, --style_fun=tidyverse_style] diff --git a/DESCRIPTION b/DESCRIPTION index 9cb07b4a5..8727fa8f8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: r.pkg.template Title: R Package Template -Version: 0.1.0.9131 -Date: 2023-11-16 +Version: 0.1.0.9132 +Date: 2023-11-20 Authors@R: person("insightsengineering", , , "insightsengineering@example.com", role = c("aut", "cre")) Description: R package template with GitHub Actions workflows included. diff --git a/NEWS.md b/NEWS.md index 14236bbeb..49ea301ab 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9131 +# r.pkg.template 0.1.0.9132 ### New features From cf2a2b6ff39bf8565f637ce9ce65307fd3ff2c90 Mon Sep 17 00:00:00 2001 From: walkowif <59475134+walkowif@users.noreply.github.com> Date: Tue, 28 Nov 2023 14:56:52 +0100 Subject: [PATCH 14/33] Install dependencies from package repositories (#200) --- .github/workflows/build-check-install.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index 3b4418dd4..2320028e7 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -122,6 +122,13 @@ on: required: false type: string default: upstream + install-deps-from-package-repositories: + description: | + Set this to a comma-separated named list of R packages repositories to use for installing dependencies. + Example: "R-universe=https://insightsengineering.r-universe.dev/,CRAN=https://cloud.r-project.org/" + required: false + type: string + default: "" unit-test-report-brand: description: Image URL to use in unit test report for branding. If empty, the default xunit-viewer brand will be used. required: false @@ -304,12 +311,14 @@ jobs: path: ${{ github.event.repository.name }} - name: Restore SD cache ๐Ÿ’ฐ + if: inputs.install-deps-from-package-repositories == '' uses: actions/cache@v3 with: key: sd-${{ runner.os }}-${{ github.event.repository.name }} path: ~/.staged.dependencies - name: Run Staged dependencies ๐ŸŽฆ + if: inputs.install-deps-from-package-repositories == '' uses: insightsengineering/staged-dependencies-action@v1 env: GITHUB_PAT: ${{ steps.github-token.outputs.token }} @@ -319,6 +328,19 @@ jobs: run-system-dependencies: ${{ inputs.install-system-dependencies }} direction: ${{ inputs.sd-direction }} + - name: Install dependencies from package repositories ๐Ÿ—„๏ธ + if: inputs.install-deps-from-package-repositories != '' + run: | + split_to_map <- function(args) { + tmp <- strsplit(x = unlist(strsplit(args, ",")), "=") + content <- unlist(lapply(tmp, function(x) x[2])) + names(content) <- unlist(lapply(tmp, function(x) x[1])) + return(content) + } + devtools::install_dev_deps(".", repos = split_to_map("${{ inputs.install-deps-from-package-repositories }}")) + shell: Rscript {0} + working-directory: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }} + - name: Show session info and installed packages โ„น run: | sessionInfo() From 1adfa9c835986c14acece9582086a096cc8e0508 Mon Sep 17 00:00:00 2001 From: walkowif Date: Tue, 28 Nov 2023 13:59:15 +0000 Subject: [PATCH 15/33] [skip actions] Bump version to 0.1.0.9133 --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8727fa8f8..a4e7d6ad4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: r.pkg.template Title: R Package Template -Version: 0.1.0.9132 -Date: 2023-11-20 +Version: 0.1.0.9133 +Date: 2023-11-28 Authors@R: person("insightsengineering", , , "insightsengineering@example.com", role = c("aut", "cre")) Description: R package template with GitHub Actions workflows included. diff --git a/NEWS.md b/NEWS.md index 49ea301ab..3a5a70e7b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9132 +# r.pkg.template 0.1.0.9133 ### New features From 3e65743909b20a2201907eaa07002dc365de5476 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 07:00:47 -0600 Subject: [PATCH 16/33] Bump tj-actions/changed-files from 40 to 41 in /.github/workflows (#201) --- .github/workflows/grammar.yaml | 2 +- .github/workflows/style.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/grammar.yaml b/.github/workflows/grammar.yaml index 07ae221b4..35ba48206 100644 --- a/.github/workflows/grammar.yaml +++ b/.github/workflows/grammar.yaml @@ -63,7 +63,7 @@ jobs: - name: Get changed files ๐Ÿ—ž id: changed-files - uses: tj-actions/changed-files@v40 + uses: tj-actions/changed-files@v41 with: separator: "," files: | diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index 4ee96170f..dd1a60296 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -60,7 +60,7 @@ jobs: - name: Get changed files ๐Ÿ—ž id: changed-files - uses: tj-actions/changed-files@v40 + uses: tj-actions/changed-files@v41 with: path: ${{ github.event.repository.name }} separator: "," From 79f9a9b09c44bedd7eb5cbbe44adfa337b8807be Mon Sep 17 00:00:00 2001 From: cicdguy Date: Wed, 3 Jan 2024 13:02:00 +0000 Subject: [PATCH 17/33] [skip actions] Bump version to 0.1.0.9134 --- .pre-commit-config.yaml | 4 ++-- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9889a711b..1f3a7b99f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,7 +47,7 @@ repos: - id: no-browser-statement - id: deps-in-desc - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.1.0 + rev: v4.0.0-alpha.8 hooks: - id: prettier - repo: https://github.com/pre-commit/pre-commit-hooks @@ -77,6 +77,6 @@ repos: files: '\.Rhistory|\.RData|\.Rds|\.rds$' # `exclude: ` to allow committing specific files. - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.37.0 + rev: v0.38.0 hooks: - id: markdownlint diff --git a/DESCRIPTION b/DESCRIPTION index a4e7d6ad4..e36d3eb71 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: r.pkg.template Title: R Package Template -Version: 0.1.0.9133 -Date: 2023-11-28 +Version: 0.1.0.9134 +Date: 2024-01-03 Authors@R: person("insightsengineering", , , "insightsengineering@example.com", role = c("aut", "cre")) Description: R package template with GitHub Actions workflows included. diff --git a/NEWS.md b/NEWS.md index 3a5a70e7b..c150fdc6b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9133 +# r.pkg.template 0.1.0.9134 ### New features From 18a15e1883b416ddb7e8a5b5bcbab5708dc2f32b Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Tue, 16 Jan 2024 11:23:52 -0600 Subject: [PATCH 18/33] Handle oddball characters in branch names (#202) Should resolve the issue reported in https://github.com/Roche/crmPack/actions/runs/7543907656/job/20535987133 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/build-check-install.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index 2320028e7..803bc35ee 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -587,8 +587,8 @@ jobs: git config pull.rebase false git pull origin ${{ env.junit_xml_storage }} || true cp ../../${{ env.PKGNAME }}.Rcheck/tests/testthat/junit-result.xml \ - ./${{ env.diff_storage_branch }}/junit-result.xml - git add -f "${{ env.diff_storage_branch }}/junit-result.xml" + './${{ env.diff_storage_branch }}/junit-result.xml' + git add -f '${{ env.diff_storage_branch }}/junit-result.xml' git commit -m "Add/Update JUnit report: ${{ github.sha }}" || true shell: bash From 6cb37ec5c7136fafac4665cc7510627f2ec414c8 Mon Sep 17 00:00:00 2001 From: cicdguy Date: Tue, 16 Jan 2024 17:24:49 +0000 Subject: [PATCH 19/33] [skip actions] Bump version to 0.1.0.9135 --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e36d3eb71..e71a01705 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: r.pkg.template Title: R Package Template -Version: 0.1.0.9134 -Date: 2024-01-03 +Version: 0.1.0.9135 +Date: 2024-01-16 Authors@R: person("insightsengineering", , , "insightsengineering@example.com", role = c("aut", "cre")) Description: R package template with GitHub Actions workflows included. diff --git a/NEWS.md b/NEWS.md index c150fdc6b..51606263b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9134 +# r.pkg.template 0.1.0.9135 ### New features From 958fa50a9735681b82ab2ba652689d33f20c5baf Mon Sep 17 00:00:00 2001 From: walkowif <59475134+walkowif@users.noreply.github.com> Date: Wed, 17 Jan 2024 13:05:40 +0100 Subject: [PATCH 20/33] Escape special characters in branch name (#203) --- .github/workflows/build-check-install.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index 803bc35ee..f451a8a4f 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -604,7 +604,7 @@ jobs: - name: Run XML comparison ๐Ÿ” if: steps.check-junit-xml.outputs.files_exists == 'true' && env.junit_xml_comparison == 'true' run: | - cp ${{ env.junit_xml_storage }}/data/${{ env.diff_storage_branch }}/junit-result.xml new.xml + cp '${{ env.junit_xml_storage }}/data/${{ env.diff_storage_branch }}/junit-result.xml' new.xml if [ ! -f ${{ env.junit_xml_storage }}/data/${{ env.junit_xml_diff_branch }}/junit-result.xml ]; then # If XML for the branch against which we're comparing doesn't exist, we're skipping the comparison. echo "JUnit report for branch \`${{ env.junit_xml_diff_branch }}\` " \ From 1363fb39999190ccc57bafc7d0f93717c07378e9 Mon Sep 17 00:00:00 2001 From: walkowif Date: Wed, 17 Jan 2024 12:06:37 +0000 Subject: [PATCH 21/33] [skip actions] Bump version to 0.1.0.9136 --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e71a01705..23cd16f28 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: r.pkg.template Title: R Package Template -Version: 0.1.0.9135 -Date: 2024-01-16 +Version: 0.1.0.9136 +Date: 2024-01-17 Authors@R: person("insightsengineering", , , "insightsengineering@example.com", role = c("aut", "cre")) Description: R package template with GitHub Actions workflows included. diff --git a/NEWS.md b/NEWS.md index 51606263b..8a56d0039 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9135 +# r.pkg.template 0.1.0.9136 ### New features From bcb64429a64ea3dc50b31ac920a7985fbc5ed14c Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Wed, 24 Jan 2024 08:58:30 -0600 Subject: [PATCH 22/33] Show output of roxygenize (#206) Shows the log output of `roxygenize`. --------- Signed-off-by: cicdguy <26552821+cicdguy@users.noreply.github.com> --- .github/workflows/roxygen.yaml | 4 +++- DESCRIPTION | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/roxygen.yaml b/.github/workflows/roxygen.yaml index 604b26a30..e89a8a9bc 100644 --- a/.github/workflows/roxygen.yaml +++ b/.github/workflows/roxygen.yaml @@ -119,6 +119,8 @@ jobs: sink() sink(type = "message") logs <- readLines(logfile) + cat("๐Ÿชต Log output of 'roxygen2::roxygenize()':\n") + system2("cat", logfile) error_marker <- grep("Error:", logs) warnings_marker <- grep("Warning message", logs) if (length(warnings_marker) > 0) { @@ -163,7 +165,7 @@ jobs: then { echo -e "\n๐Ÿ’ป Please rerun the following command on your workstation and push your changes" echo "--------------------------------------------------------------------" - echo "roxygen2::roxygenize('.', roclets = c('rd', 'collate', 'namespace'))" + echo "roxygen2::roxygenize('.')" echo "--------------------------------------------------------------------" echo "โ„น roxygen2 version that was used in this workflow: $ROXYGEN_VERSION" echo "๐Ÿ™ Please ensure that the 'RoxygenNote' field in the DESCRIPTION file matches this version" diff --git a/DESCRIPTION b/DESCRIPTION index 23cd16f28..7f7b98a5d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -28,4 +28,4 @@ Encoding: UTF-8 Language: en-US LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.0 From bc0d8c5c85ac8a7e522a0023eaeebe6c45638389 Mon Sep 17 00:00:00 2001 From: cicdguy Date: Wed, 24 Jan 2024 14:59:29 +0000 Subject: [PATCH 23/33] [skip actions] Bump version to 0.1.0.9137 --- .pre-commit-config.yaml | 2 +- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1f3a7b99f..f28275329 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ # R specific hooks: https://github.com/lorenzwalthert/precommit repos: - repo: https://github.com/lorenzwalthert/precommit - rev: v0.3.2.9027 + rev: v0.4.0 hooks: - id: style-files args: [--style_pkg=styler, --style_fun=tidyverse_style] diff --git a/DESCRIPTION b/DESCRIPTION index 7f7b98a5d..52ae6bd89 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: r.pkg.template Title: R Package Template -Version: 0.1.0.9136 -Date: 2024-01-17 +Version: 0.1.0.9137 +Date: 2024-01-24 Authors@R: person("insightsengineering", , , "insightsengineering@example.com", role = c("aut", "cre")) Description: R package template with GitHub Actions workflows included. diff --git a/NEWS.md b/NEWS.md index 8a56d0039..dcd602b91 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9136 +# r.pkg.template 0.1.0.9137 ### New features From e1b22bccd322028e1a88e92d5b4135ccde99d286 Mon Sep 17 00:00:00 2001 From: walkowif <59475134+walkowif@users.noreply.github.com> Date: Thu, 8 Feb 2024 17:16:11 +0100 Subject: [PATCH 24/33] Update actions versions (#207) Signed-off-by: cicdguy <26552821+cicdguy@users.noreply.github.com> Co-authored-by: cicdguy <26552821+cicdguy@users.noreply.github.com> --- .github/workflows/bioccheck.yaml | 4 ++-- .github/workflows/build-check-install.yaml | 16 ++++++++-------- .github/workflows/grammar.yaml | 6 +++--- .github/workflows/pkgdown.yaml | 4 ++-- .github/workflows/roxygen.yaml | 2 +- .github/workflows/style.yaml | 2 +- .github/workflows/test-coverage.yaml | 8 ++++---- .github/workflows/validation.yaml | 4 ++-- .github/workflows/verdepcheck.yaml | 4 ++-- .github/workflows/version-bump.yaml | 4 ++-- .github/workflows/version.yaml | 2 +- DESCRIPTION | 2 +- 12 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/bioccheck.yaml b/.github/workflows/bioccheck.yaml index 4284a8e16..cf5408fd1 100644 --- a/.github/workflows/bioccheck.yaml +++ b/.github/workflows/bioccheck.yaml @@ -93,7 +93,7 @@ jobs: uses: tj-actions/branch-names@v7 - name: Checkout repo (PR) ๐Ÿ›Ž - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: github.event_name == 'pull_request' with: ref: ${{ steps.branch-name.outputs.head_ref_branch }} @@ -108,7 +108,7 @@ jobs: path: ${{ github.event.repository.name }} - name: Restore SD cache ๐Ÿ’ฐ - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: sd-${{ runner.os }}-${{ github.event.repository.name }} path: ~/.staged.dependencies diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index f451a8a4f..ec7476cb3 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -271,7 +271,7 @@ jobs: if: >- inputs.publish-unit-test-report-gh-pages == true && github.event_name != 'pull_request' - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: npm-${{ runner.os }}-${{ github.job }} restore-keys: | @@ -312,7 +312,7 @@ jobs: - name: Restore SD cache ๐Ÿ’ฐ if: inputs.install-deps-from-package-repositories == '' - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: sd-${{ runner.os }}-${{ github.event.repository.name }} path: ~/.staged.dependencies @@ -386,7 +386,7 @@ jobs: - name: Restore any additional caches ๐Ÿ“ฅ if: inputs.additional-caches != '' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: "${{ inputs.additional-caches }}" key: additional-caches-${{ runner.os }} @@ -512,7 +512,7 @@ jobs: - name: Check whether JUnit XML report exists ๐Ÿšฆ id: check-junit-xml - uses: andstor/file-existence-action@v2 + uses: andstor/file-existence-action@v3 with: files: "${{ env.PKGNAME }}.Rcheck/tests/testthat/junit-result.xml" @@ -538,7 +538,7 @@ jobs: steps.check-junit-xml.outputs.files_exists == 'true' && inputs.publish-unit-test-report-gh-pages == true && github.event_name != 'pull_request' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: unit-test-report path: "index.html" @@ -564,7 +564,7 @@ jobs: - name: Fetch JUnit XML reports from ${{ env.junit_xml_storage }} โคต๏ธ if: steps.check-junit-xml.outputs.files_exists == 'true' && env.junit_xml_comparison == 'true' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ${{ env.junit_xml_storage }} fetch-depth: 0 @@ -661,7 +661,7 @@ jobs: env.junit_xml_comparison_result_method == 'artifact' && !github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: output-artifact.md name: junit-xml-report-comparison @@ -754,7 +754,7 @@ jobs: - name: Upload package build โคด if: startsWith(github.ref, 'refs/tags/v') - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}/${{ env.PKGBUILD }} name: ${{ env.PKGBUILD }} diff --git a/.github/workflows/grammar.yaml b/.github/workflows/grammar.yaml index 35ba48206..aa8403a38 100644 --- a/.github/workflows/grammar.yaml +++ b/.github/workflows/grammar.yaml @@ -43,7 +43,7 @@ jobs: uses: actions/checkout@v4 - name: Restore npm cache ๐Ÿ’ฐ - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: npm-${{ runner.os }}-${{ github.job }} restore-keys: | @@ -51,7 +51,7 @@ jobs: path: node_modules - name: Setup NodeJS โ˜Š - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 id: npm-cache with: node-version: 20 @@ -122,7 +122,7 @@ jobs: - name: Check whether annotations exist ๐Ÿ’ญ id: check-annotations if: inputs.enable-annotations - uses: andstor/file-existence-action@v2 + uses: andstor/file-existence-action@v3 with: files: "annotations.json" diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 5480e3f31..e82b17820 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -173,7 +173,7 @@ jobs: path: ${{ github.event.repository.name }} - name: Restore SD cache ๐Ÿ’ฐ - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: sd-${{ runner.os }}-${{ github.event.repository.name }} path: ~/.staged.dependencies @@ -267,7 +267,7 @@ jobs: - name: Upload docs for review โฌ† if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/v') - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pkgdown.zip path: pkgdown.zip diff --git a/.github/workflows/roxygen.yaml b/.github/workflows/roxygen.yaml index e89a8a9bc..64dfa02ff 100644 --- a/.github/workflows/roxygen.yaml +++ b/.github/workflows/roxygen.yaml @@ -94,7 +94,7 @@ jobs: path: ${{ github.event.repository.name }} - name: Restore SD cache ๐Ÿ’ฐ - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: sd-${{ runner.os }}-${{ github.event.repository.name }} path: ~/.staged.dependencies diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index dd1a60296..cb3cb2d35 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -99,7 +99,7 @@ jobs: - name: Check file existence ๐Ÿค” id: check_files - uses: andstor/file-existence-action@v2 + uses: andstor/file-existence-action@v3 with: files: "/tmp/style-problems.R, /tmp/style-problems.txt" diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index f8f670441..0ea66585e 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -181,7 +181,7 @@ jobs: path: ${{ github.event.repository.name }} - name: Restore SD cache ๐Ÿ’ฐ - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: sd-${{ runner.os }}-${{ github.event.repository.name }} path: ~/.staged.dependencies @@ -257,7 +257,7 @@ jobs: - name: Check whether coverage reports exists ๐Ÿ’ญ id: check_coverage_reports - uses: andstor/file-existence-action@v2 + uses: andstor/file-existence-action@v3 with: files: >- ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}/coverage.xml, @@ -276,7 +276,7 @@ jobs: continue-on-error: true - name: Upload report ๐Ÿ”ผ - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-report path: | @@ -312,7 +312,7 @@ jobs: path: ${{ github.event.repository.name }} - name: Restore SD cache ๐Ÿ’ฐ - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: sd-${{ runner.os }}-${{ github.event.repository.name }} path: ~/.staged.dependencies diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index ef13ec1b0..9b93814e5 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -84,7 +84,7 @@ jobs: shell: bash - name: Restore SD cache ๐Ÿ’ฐ - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: sd-${{ runner.os }}-${{ github.event.repository.name }} path: ~/.staged.dependencies @@ -109,7 +109,7 @@ jobs: - name: Upload report for review โฌ† if: github.ref != 'refs/heads/main' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: validation_report.pdf path: validation_report.pdf diff --git a/.github/workflows/verdepcheck.yaml b/.github/workflows/verdepcheck.yaml index d4d56b3c8..b7102f9d1 100644 --- a/.github/workflows/verdepcheck.yaml +++ b/.github/workflows/verdepcheck.yaml @@ -92,14 +92,14 @@ jobs: - name: Upload lock file โคด๏ธ if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "lock-file-${{ env.strategy }}" path: pkg.lock - name: Upload output file โคด๏ธ if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "res-${{ env.strategy }}" path: res.RDS diff --git a/.github/workflows/version-bump.yaml b/.github/workflows/version-bump.yaml index 11faf3dc5..7c3d22fdd 100644 --- a/.github/workflows/version-bump.yaml +++ b/.github/workflows/version-bump.yaml @@ -100,7 +100,7 @@ jobs: - name: Check if a pre-commit config exists id: precommit-config-exists - uses: andstor/file-existence-action@v2 + uses: andstor/file-existence-action@v3 with: files: ".pre-commit-config.yaml" @@ -108,7 +108,7 @@ jobs: if: | inputs.disable-precommit-autoupdate != 'true' && steps.precommit-config-exists.outputs.files_exists == 'true' - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.12' diff --git a/.github/workflows/version.yaml b/.github/workflows/version.yaml index 27a6a11ee..2ea74f723 100644 --- a/.github/workflows/version.yaml +++ b/.github/workflows/version.yaml @@ -74,7 +74,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Python ๐Ÿ - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.12' diff --git a/DESCRIPTION b/DESCRIPTION index 52ae6bd89..be06a7df1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -28,4 +28,4 @@ Encoding: UTF-8 Language: en-US LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.0 +RoxygenNote: 7.3.1 From c81f1546427f7d2ba54c2fce925970b400048a5e Mon Sep 17 00:00:00 2001 From: walkowif Date: Thu, 8 Feb 2024 16:17:18 +0000 Subject: [PATCH 25/33] [skip actions] Bump version to 0.1.0.9138 --- .pre-commit-config.yaml | 2 +- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f28275329..6e937f419 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -77,6 +77,6 @@ repos: files: '\.Rhistory|\.RData|\.Rds|\.rds$' # `exclude: ` to allow committing specific files. - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.38.0 + rev: v0.39.0 hooks: - id: markdownlint diff --git a/DESCRIPTION b/DESCRIPTION index be06a7df1..22d0519ff 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: r.pkg.template Title: R Package Template -Version: 0.1.0.9137 -Date: 2024-01-24 +Version: 0.1.0.9138 +Date: 2024-02-08 Authors@R: person("insightsengineering", , , "insightsengineering@example.com", role = c("aut", "cre")) Description: R package template with GitHub Actions workflows included. diff --git a/NEWS.md b/NEWS.md index dcd602b91..0bdd4062f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9137 +# r.pkg.template 0.1.0.9138 ### New features From 37cff7a9120cfa0b107336796a33a4eede382d8e Mon Sep 17 00:00:00 2001 From: walkowif <59475134+walkowif@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:20:27 +0100 Subject: [PATCH 26/33] Fix some more action deprecation warnings (#208) --- .github/workflows/build-check-install.yaml | 4 ++-- .github/workflows/pkgdown.yaml | 2 +- .github/workflows/test-coverage.yaml | 2 +- .github/workflows/validation.yaml | 2 +- .github/workflows/version-bump.yaml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index ec7476cb3..c5b19748b 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -783,7 +783,7 @@ jobs: shell: bash - name: Download JUnit HTML report as artifact โคต๏ธ - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: unit-test-report path: unit-test-report @@ -843,7 +843,7 @@ jobs: shell: bash - name: Download artifact โฌ - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.PKGBUILD }} diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index e82b17820..0e1864e84 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -311,7 +311,7 @@ jobs: uses: actions/checkout@v4 - name: Download artifact โฌ - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: pkgdown.zip diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 0ea66585e..106f5b9c6 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -359,7 +359,7 @@ jobs: shell: bash - name: Download coverage report as artifact โคต๏ธ - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: coverage-report path: coverage-report diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 9b93814e5..872b163a6 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -124,7 +124,7 @@ jobs: uses: actions/checkout@v4 - name: Download artifact โฌ - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: validation_report.pdf diff --git a/.github/workflows/version-bump.yaml b/.github/workflows/version-bump.yaml index 7c3d22fdd..1a8be349d 100644 --- a/.github/workflows/version-bump.yaml +++ b/.github/workflows/version-bump.yaml @@ -144,7 +144,7 @@ jobs: - name: Commit and push changes ๐Ÿ“Œ if: ${{ env.NEW_PKG_VERSION }} - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "[skip actions] Bump version to ${{ env.NEW_PKG_VERSION }}" file_pattern: "${{ steps.file-pattern.outputs.file-pattern }}" From da7ff817c8a4db4f908988c648f183ab49351e22 Mon Sep 17 00:00:00 2001 From: walkowif Date: Fri, 9 Feb 2024 13:21:22 +0000 Subject: [PATCH 27/33] [skip actions] Bump version to 0.1.0.9139 --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 22d0519ff..6298b25f0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: r.pkg.template Title: R Package Template -Version: 0.1.0.9138 -Date: 2024-02-08 +Version: 0.1.0.9139 +Date: 2024-02-09 Authors@R: person("insightsengineering", , , "insightsengineering@example.com", role = c("aut", "cre")) Description: R package template with GitHub Actions workflows included. diff --git a/NEWS.md b/NEWS.md index 0bdd4062f..98e342ef6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9138 +# r.pkg.template 0.1.0.9139 ### New features From e46f6875d34fedb814280a0bdfbb78974fe58043 Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Fri, 9 Feb 2024 08:46:23 -0600 Subject: [PATCH 28/33] Handle empty default landing page (#209) Otherwise there will be infinite redirects. --- .github/workflows/pkgdown.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 0e1864e84..5b2c70ae7 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -289,11 +289,23 @@ jobs: path: ${{ github.event.repository.name }} ref: "gh-pages" + - name: Normalize inputs ๐Ÿ“„ + id: normalize + run: | + DEFAULT_LANDING_PAGE="${{ inputs.default-landing-page }}" + if [ "$DEFAULT_LANDING_PAGE" == "" ] + then { + DEFAULT_LANDING_PAGE=main + } + fi + echo "default-landing-page=$DEFAULT_LANDING_PAGE" >> "$GITHUB_ENV" + shell: bash + - name: Create and publish docs โ†—๏ธ uses: insightsengineering/r-pkgdown-multiversion@v2 with: path: ${{ github.event.repository.name }} - default-landing-page: ${{ inputs.default-landing-page }} + default-landing-page: ${{ env.default-landing-page }} refs-order: ${{ inputs.refs-order }} latest-tag-alt-name: ${{ inputs.latest-tag-alt-name }} release-candidate-alt-name: ${{ inputs.release-candidate-alt-name }} From 01672bbc19db00301e85320c0e4e5403d28e3ca3 Mon Sep 17 00:00:00 2001 From: cicdguy Date: Fri, 9 Feb 2024 14:47:18 +0000 Subject: [PATCH 29/33] [skip actions] Bump version to 0.1.0.9140 --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6298b25f0..3f00c9712 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: r.pkg.template Title: R Package Template -Version: 0.1.0.9139 +Version: 0.1.0.9140 Date: 2024-02-09 Authors@R: person("insightsengineering", , , "insightsengineering@example.com", role = c("aut", "cre")) diff --git a/NEWS.md b/NEWS.md index 98e342ef6..701e022b2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9139 +# r.pkg.template 0.1.0.9140 ### New features From 2b7d0a78d26876530c31c33d2d7c7109c0e8ca45 Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Tue, 13 Feb 2024 09:58:17 -0600 Subject: [PATCH 30/33] fix: Normalize the option to post coverage as PR comment (#210) This should bring back the coverage PR comment on this repo. --- .github/workflows/test-coverage.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 106f5b9c6..e97d0995f 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -180,6 +180,17 @@ jobs: ref: ${{ steps.branch-name.outputs.head_ref_branch }} path: ${{ github.event.repository.name }} + - name: Normalize inputs โŠณ + id: normalizer + shell: bash + run: | + echo "publish-coverage-report=${{ inputs.publish-coverage-report }}" >> $GITHUB_OUTPUT + if [ "${{ inputs.publish-coverage-report }}" == "" ] + then { + echo "publish-coverage-report=true" >> $GITHUB_OUTPUT + } + fi + - name: Restore SD cache ๐Ÿ’ฐ uses: actions/cache@v4 with: @@ -271,7 +282,7 @@ jobs: path: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}/coverage.xml threshold: 80 fail: false - publish: ${{ inputs.publish-coverage-report }} + publish: ${{ steps.normalizer.outputs.publish-coverage-report }} diff: true continue-on-error: true From faf2a29b64a4f92e9fe55f71dd03065590ec3649 Mon Sep 17 00:00:00 2001 From: cicdguy Date: Tue, 13 Feb 2024 15:59:17 +0000 Subject: [PATCH 31/33] [skip actions] Bump version to 0.1.0.9141 --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3f00c9712..3ad76142c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: r.pkg.template Title: R Package Template -Version: 0.1.0.9140 -Date: 2024-02-09 +Version: 0.1.0.9141 +Date: 2024-02-13 Authors@R: person("insightsengineering", , , "insightsengineering@example.com", role = c("aut", "cre")) Description: R package template with GitHub Actions workflows included. diff --git a/NEWS.md b/NEWS.md index 701e022b2..80dbee99a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9140 +# r.pkg.template 0.1.0.9141 ### New features From 30bec9e7ca6f9a7583d3490acf8c56c45101ca9b Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Thu, 22 Feb 2024 08:14:54 -0600 Subject: [PATCH 32/33] fix: Update action which now uses Node 20 (#211) --- .github/workflows/release.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6c0bc86d0..fd6c64cfe 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -79,7 +79,8 @@ jobs: if: >- steps.rc-tag.outputs.is-rc-tag == 'false' || inputs.create-rc-releases == true - uses: softprops/action-gh-release@v1 + # https://github.com/softprops/action-gh-release/pull/406#issuecomment-1934635958 + uses: softprops/action-gh-release@4634c16e79c963813287e889244c50009e7f0981 with: body_path: ${{ inputs.package-subdirectory }}/RELEASE_BODY.txt token: ${{ steps.github-token.outputs.token }} From 6e7b4a141541ccb7235f350b08633120fed2f7d8 Mon Sep 17 00:00:00 2001 From: cicdguy Date: Thu, 22 Feb 2024 14:15:52 +0000 Subject: [PATCH 33/33] [skip actions] Bump version to 0.1.0.9142 --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3ad76142c..a76551680 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: r.pkg.template Title: R Package Template -Version: 0.1.0.9141 -Date: 2024-02-13 +Version: 0.1.0.9142 +Date: 2024-02-22 Authors@R: person("insightsengineering", , , "insightsengineering@example.com", role = c("aut", "cre")) Description: R package template with GitHub Actions workflows included. diff --git a/NEWS.md b/NEWS.md index 80dbee99a..c8ff6dca8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9141 +# r.pkg.template 0.1.0.9142 ### New features