From fc297e15d0c516e8f304d9f7bc44f98d0e919129 Mon Sep 17 00:00:00 2001 From: walkowif <59475134+walkowif@users.noreply.github.com> Date: Mon, 19 Aug 2024 16:31:51 +0200 Subject: [PATCH] Update shared workflows (#251) --- .github/workflows/check.yaml.shared | 45 ++++++++++++++++++++----- .github/workflows/docs.yaml.shared | 7 ++-- .github/workflows/release.yaml.shared | 24 +++++++------ .github/workflows/scheduled.yaml.shared | 8 ++++- 4 files changed, 62 insertions(+), 22 deletions(-) diff --git a/.github/workflows/check.yaml.shared b/.github/workflows/check.yaml.shared index f2a2a8c82..091960eeb 100644 --- a/.github/workflows/check.yaml.shared +++ b/.github/workflows/check.yaml.shared @@ -28,13 +28,43 @@ jobs: additional-env-vars: | _R_CHECK_CRAN_INCOMING_REMOTE_=false additional-r-cmd-check-params: --as-cran + enforce-note-blocklist: true + note-blocklist: | + checking dependencies in R code .* NOTE + checking R code for possible problems .* NOTE + checking examples .* NOTE + checking Rd line widths .* NOTE + checking S3 generic/method consistency .* NOTE + checking Rd .usage sections .* NOTE + checking for unstated dependencies in vignettes .* NOTE + checking top-level files .* NOTE + r-cmd-non-cran: + name: R CMD Check (non-CRAN) 🧬 + uses: insightsengineering/r.pkg.template/.github/workflows/build-check-install.yaml@main + secrets: + REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} + with: + additional-env-vars: | + NOT_CRAN=true + enforce-note-blocklist: true + concurrency-group: non-cran + unit-test-report-directory: unit-test-report-non-cran + note-blocklist: | + checking dependencies in R code .* NOTE + checking R code for possible problems .* NOTE + checking examples .* NOTE + checking Rd line widths .* NOTE + checking S3 generic/method consistency .* NOTE + checking Rd .usage sections .* NOTE + checking for unstated dependencies in vignettes .* NOTE + checking top-level files .* NOTE coverage: name: Coverage πŸ“” uses: insightsengineering/r.pkg.template/.github/workflows/test-coverage.yaml@main secrets: REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} linter: - if: github.event_name == 'pull_request' + if: github.event_name != 'push' name: SuperLinter πŸ¦Έβ€β™€οΈ uses: insightsengineering/r.pkg.template/.github/workflows/linter.yaml@main roxygen: @@ -48,11 +78,12 @@ jobs: name: gitleaks πŸ’§ uses: insightsengineering/r.pkg.template/.github/workflows/gitleaks.yaml@main spelling: - if: github.event_name == 'pull_request' name: Spell Check πŸ†Ž uses: insightsengineering/r.pkg.template/.github/workflows/spelling.yaml@main + secrets: + REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} links: - if: github.event_name == 'pull_request' + if: github.event_name != 'push' name: Check URLs 🌐 uses: insightsengineering/r.pkg.template/.github/workflows/links.yaml@main vbump: @@ -68,12 +99,10 @@ jobs: name: License Check πŸƒ uses: insightsengineering/r.pkg.template/.github/workflows/licenses.yaml@main style: - if: github.event_name == 'pull_request' + if: github.event_name != 'push' name: Style Check πŸ‘— uses: insightsengineering/r.pkg.template/.github/workflows/style.yaml@main with: auto-update: true - grammar: - if: github.event_name == 'pull_request' - name: Grammar Check πŸ”€ - uses: insightsengineering/r.pkg.template/.github/workflows/grammar.yaml@main + secrets: + REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} diff --git a/.github/workflows/docs.yaml.shared b/.github/workflows/docs.yaml.shared index 4c30376c2..57ae80042 100644 --- a/.github/workflows/docs.yaml.shared +++ b/.github/workflows/docs.yaml.shared @@ -7,7 +7,7 @@ on: - main paths: - "inst/templates/**" - - "_pkgdown.y[a]ml" + - "_pkgdown.*" - DESCRIPTION - "**.md" - "**.Rmd" @@ -24,7 +24,7 @@ on: - main paths: - "inst/templates/**" - - "_pkgdown.y[a]ml" + - "_pkgdown.*" - DESCRIPTION - "**.md" - "**.Rmd" @@ -39,3 +39,6 @@ jobs: uses: insightsengineering/r.pkg.template/.github/workflows/pkgdown.yaml@main secrets: REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} + with: + default-landing-page: latest-tag + additional-unit-test-report-directories: unit-test-report-non-cran diff --git a/.github/workflows/release.yaml.shared b/.github/workflows/release.yaml.shared index a02621430..ffd6b68ef 100644 --- a/.github/workflows/release.yaml.shared +++ b/.github/workflows/release.yaml.shared @@ -8,15 +8,6 @@ on: workflow_dispatch: jobs: - build: - name: Build package 🎁 - needs: release - uses: insightsengineering/r.pkg.template/.github/workflows/build-check-install.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - with: - skip-r-cmd-check: true - skip-r-cmd-install: true docs: name: Pkgdown Docs πŸ“š needs: release @@ -36,8 +27,8 @@ jobs: uses: insightsengineering/r.pkg.template/.github/workflows/release.yaml@main secrets: REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - r-cmd: - name: R CMD Check 🧬 + build: + name: Build package and reports 🎁 needs: [release, docs] uses: insightsengineering/r.pkg.template/.github/workflows/build-check-install.yaml@main secrets: @@ -46,9 +37,20 @@ jobs: additional-env-vars: | _R_CHECK_CRAN_INCOMING_REMOTE_=false additional-r-cmd-check-params: --as-cran + enforce-note-blocklist: true + note-blocklist: | + checking dependencies in R code .* NOTE + checking R code for possible problems .* NOTE + checking examples .* NOTE + checking Rd line widths .* NOTE + checking top-level files .* NOTE coverage: name: Coverage πŸ“” needs: [release, docs] uses: insightsengineering/r.pkg.template/.github/workflows/test-coverage.yaml@main secrets: REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} + wasm: + name: Build WASM packages πŸ§‘β€πŸ­ + needs: release + uses: insightsengineering/r.pkg.template/.github/workflows/wasm.yaml@main diff --git a/.github/workflows/scheduled.yaml.shared b/.github/workflows/scheduled.yaml.shared index b752a49b1..61a50753e 100644 --- a/.github/workflows/scheduled.yaml.shared +++ b/.github/workflows/scheduled.yaml.shared @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - test-strategy: ["min", "release", "max"] + test-strategy: ["min_cohort", "min_isolated", "release", "max"] uses: insightsengineering/r.pkg.template/.github/workflows/verdepcheck.yaml@main name: Dependency Test - ${{ matrix.test-strategy }} πŸ”’ secrets: @@ -26,3 +26,9 @@ jobs: uses: insightsengineering/r.pkg.template/.github/workflows/branch-cleanup.yaml@main secrets: REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} + revdepcheck: + name: revdepcheck ↩️ + uses: insightsengineering/r.pkg.template/.github/workflows/revdepcheck.yaml@main + rhub: + name: R-hub 🌐 + uses: insightsengineering/r.pkg.template/.github/workflows/rhub.yaml@main