From c33dd4cdb5fed70b0e4a8284aa6dc981bfe5b937 Mon Sep 17 00:00:00 2001 From: walkowif <59475134+walkowif@users.noreply.github.com> Date: Tue, 9 Apr 2024 16:20:17 +0200 Subject: [PATCH 1/2] Update packages in `build-check-install` workflow + run `staged.dependencies` conditionally (#222) Signed-off-by: walkowif <59475134+walkowif@users.noreply.github.com> Co-authored-by: cicdguy <26552821+cicdguy@users.noreply.github.com> --- .github/workflows/build-check-install.yaml | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index 1bf22de7..6a53c524 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -174,6 +174,18 @@ on: required: false type: string default: "" + enable-sd: + description: | + Whether the installation of package dependencies via staged.dependencies should be enabled. + required: false + type: boolean + default: true + update-r-packages: + description: | + Whether R packages installed in the container should be updated to their latest version from CRAN/BioC. + required: false + type: boolean + default: false concurrency: group: r-cmd-${{ inputs.concurrency-group }}-${{ github.event.pull_request.number || github.ref }} @@ -296,11 +308,13 @@ jobs: junit_xml_comparison_input="${{ inputs.junit-xml-comparison }}" junit_xml_positive_threshold="${{ inputs.junit-xml-positive-threshold }}" junit_xml_negative_threshold="${{ inputs.junit-xml-negative-threshold }}" + enable_sd="${{ inputs.enable-sd }}" echo "junit_xml_storage=${junit_xml_storage_input:-_junit_xml_reports}" >> $GITHUB_ENV echo "junit_xml_diff_branch=${junit_xml_diff_branch_input:-main}" >> $GITHUB_ENV echo "junit_xml_comparison=${junit_xml_comparison_input:-true}" >> $GITHUB_ENV echo "junit_xml_positive_threshold=${junit_xml_positive_threshold:-1.0}" >> $GITHUB_ENV echo "junit_xml_negative_threshold=${junit_xml_negative_threshold:-1.0}" >> $GITHUB_ENV + echo "enable_sd=${enable_sd:-true}" >> $GITHUB_ENV shell: bash - name: Restore npm cache 💰 @@ -338,8 +352,17 @@ jobs: key: sd-${{ runner.os }}-${{ github.event.repository.name }} path: ~/.staged.dependencies + - name: Update R packages 🗓️ + if: >- + inputs.update-r-packages == true + run: | + update.packages() + shell: Rscript {0} + - name: Run Staged dependencies 🎦 - if: inputs.install-deps-from-package-repositories == '' + if: >- + env.enable_sd == 'true' + && inputs.install-deps-from-package-repositories == '' uses: insightsengineering/staged-dependencies-action@v1 env: GITHUB_PAT: ${{ steps.github-token.outputs.token }} From 301013daf982d557be1ac139c0046efe33f99401 Mon Sep 17 00:00:00 2001 From: walkowif Date: Tue, 9 Apr 2024 14:21:19 +0000 Subject: [PATCH 2/2] [skip actions] Bump version to 0.1.0.9150 --- .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 6e937f41..a77b13cd 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.4.0 + rev: v0.4.1 hooks: - id: style-files args: [--style_pkg=styler, --style_fun=tidyverse_style] @@ -51,7 +51,7 @@ repos: hooks: - id: prettier - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-added-large-files args: ["--maxkb=200"] diff --git a/DESCRIPTION b/DESCRIPTION index 689e916b..e20d364a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: r.pkg.template Title: R Package Template -Version: 0.1.0.9149 -Date: 2024-03-21 +Version: 0.1.0.9150 +Date: 2024-04-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 f9db321b..76ce8071 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9149 +# r.pkg.template 0.1.0.9150 ### New features