diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index f5ff446a..167e86c5 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -1,93 +1,103 @@ + --- -name: Check πŸ›  +# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +name: R-CMD-check-macos πŸ“¦ on: - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + # 'push' events are triggered when commits + # are pushed to one of these branches + push: branches: - main - push: + - cran_mac + tags: + - "v*" + # 'pull_request' events are triggered when PRs are + # created against one of these target branches. + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review branches: - main + # 'workflow_dispatch' gives you the ability + # to run this workflow on demand, anytime workflow_dispatch: jobs: - audit: - name: Audit Dependencies πŸ•΅οΈβ€β™‚οΈ - uses: insightsengineering/r.pkg.template/.github/workflows/audit.yaml@main - r-cmd: - name: R CMD Check 🧬 - uses: insightsengineering/r.pkg.template/.github/workflows/build-check-install.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - with: - additional-env-vars: | - _R_CHECK_CRAN_INCOMING_REMOTE_=false - _R_CHECK_EXAMPLE_TIMING_THRESHOLD_=10 - 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 - unit-test-report-brand: >- - https://raw.githubusercontent.com/insightsengineering/hex-stickers/main/thumbs/teal.png - 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 != 'push' - name: SuperLinter πŸ¦Έβ€β™€οΈ - uses: insightsengineering/r.pkg.template/.github/workflows/linter.yaml@main - roxygen: - name: Roxygen πŸ…Ύ - uses: insightsengineering/r.pkg.template/.github/workflows/roxygen.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - with: - auto-update: true - gitleaks: - name: gitleaks πŸ’§ - uses: insightsengineering/r.pkg.template/.github/workflows/gitleaks.yaml@main - spelling: - 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 != 'push' - name: Check URLs 🌐 - uses: insightsengineering/r.pkg.template/.github/workflows/links.yaml@main - vbump: - name: Version Bump πŸ€œπŸ€› - if: github.event_name == 'push' - uses: insightsengineering/r.pkg.template/.github/workflows/version-bump.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - version: - name: Version Check 🏁 - uses: insightsengineering/r.pkg.template/.github/workflows/version.yaml@main - licenses: - name: License Check πŸƒ - uses: insightsengineering/r.pkg.template/.github/workflows/licenses.yaml@main - style: - 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 != 'push' - name: Grammar Check πŸ”€ - uses: insightsengineering/r.pkg.template/.github/workflows/grammar.yaml@main + check: + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + runs-on: ${{ matrix.config.os }} + strategy: + fail-fast: false + matrix: + config: + - { os: macOS-14, r: "release" } + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + _R_CHECK_FORCE_SUGGESTS_: FALSE + LC_CTYPE: en_GB.UTF-8 + RMPI_TYPE: OPENMPI + R_BROWSER: false + R_PDFVIEWER: false + _R_CHECK_INSTALL_DEPENDS_: true + _R_CHECK_NO_RECOMMENDED_: true + _R_CHECK_TIMINGS_: 10 + _R_CHECK_DEPRECATED_DEFUNCT_: true + _R_CHECK_CODE_ASSIGN_TO_GLOBALENV_: true + _R_CHECK_CODE_DATA_INTO_GLOBALENV_: true + _R_CHECK_SCREEN_DEVICE_: warn + _R_CHECK_S3_METHODS_NOT_REGISTERED_: true + _R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_: true + _R_CHECK_NATIVE_ROUTINE_REGISTRATION_: true + _R_CHECK_FF_CALLS_: registration + _R_CHECK_PRAGMAS_: true + _R_CHECK_COMPILATION_FLAGS_: true + _R_CHECK_COMPILATION_FLAGS_KNOWN_: "-Wconversion -Wno-sign-conversion" + _R_CHECK_THINGS_IN_TEMP_DIR_: true + _R_CHECK_THINGS_IN_TEMP_DIR_EXCLUDE_: "^(ompi|dsymutil)" + _R_CHECK_MATRIX_DATA_: TRUE + _R_CHECK_ORPHANED_: true + _R_CHECK_BROWSER_NONINTERACTIVE_: true + _R_CHECK_MBCS_CONVERSION_FAILURE_: true + _R_CHECK_RD_VALIDATE_RD2HTML_: true + _R_CHECK_RD_MATH_RENDERING_: true + _R_CHECK_VALIDATE_UTF8_: true + R_DEFAULT_INTERNET_TIMEOUT: 600 + NOAWT: 1 + RGL_USE_NULL: true + WNHOME: /usr/local/wordnet-3.1 + _R_CHECK_XREFS_USE_ALIASES_FROM_CRAN_: TRUE + _R_CHECK_RD_VALIDATE_RD2HTML_: true + _R_CHECK_RD_MATH_RENDERING_: true + _R_CHECK_VIGNETTES_SKIP_RUN_MAYBE_: true + _R_CHECK_TESTS_NLINES_: 0 + _R_CHECK_VIGNETTES_NLINES_: 0 + + if: > + !contains(github.event.commits[0].message, '[skip checks]') + steps: + - name: Checkout repository πŸ›Ž + uses: actions/checkout@v4 + + - name: Install Pandoc + uses: r-lib/actions/setup-pandoc@v2 + + - name: Setup R πŸ“Š + 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 + + - name: Install R package dependencies πŸ“¦ + uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + + - name: Run R CMD check 🎯 + uses: r-lib/actions/check-r-package@v2 \ No newline at end of file diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml deleted file mode 100644 index 9b7a7e54..00000000 --- a/.github/workflows/docs.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: Docs πŸ“š - -on: - push: - branches: - - main - paths: - - "inst/templates/**" - - "_pkgdown.*" - - DESCRIPTION - - "**.md" - - "**.Rmd" - - "man/**" - - "LICENSE.*" - - NAMESPACE - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review - branches: - - main - paths: - - "inst/templates/**" - - "_pkgdown.*" - - DESCRIPTION - - "**.md" - - "**.Rmd" - - "man/**" - - "LICENSE.*" - - NAMESPACE - workflow_dispatch: - -jobs: - docs: - name: Pkgdown Docs πŸ“š - uses: insightsengineering/r.pkg.template/.github/workflows/pkgdown.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - with: - default-landing-page: latest-tag diff --git a/.github/workflows/post-release.yaml b/.github/workflows/post-release.yaml deleted file mode 100644 index c5fb8220..00000000 --- a/.github/workflows/post-release.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: Post release ✨ - -on: - release: - types: ["released"] - -jobs: - vbump: - name: Version Bump πŸ€œπŸ€› - uses: insightsengineering/r.pkg.template/.github/workflows/version-bump.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - with: - vbump-after-release: true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 0fa4a06c..00000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -name: Release 🎈 - -on: - push: - tags: - - "v*" - 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 - uses: insightsengineering/r.pkg.template/.github/workflows/pkgdown.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - with: - default-landing-page: latest-tag - validation: - name: R Package Validation report πŸ“ƒ - needs: release - uses: insightsengineering/r.pkg.template/.github/workflows/validation.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - release: - name: Create release πŸŽ‰ - uses: insightsengineering/r.pkg.template/.github/workflows/release.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - r-cmd: - name: R CMD Check 🧬 - needs: [release, docs] - uses: insightsengineering/r.pkg.template/.github/workflows/build-check-install.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - with: - 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 - unit-test-report-brand: >- - https://raw.githubusercontent.com/insightsengineering/hex-stickers/main/thumbs/teal.png - 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 }} diff --git a/.github/workflows/scheduled.yaml b/.github/workflows/scheduled.yaml deleted file mode 100644 index f2ddf686..00000000 --- a/.github/workflows/scheduled.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Scheduled πŸ•°οΈ - -on: - schedule: - - cron: '45 3 * * 0' - workflow_dispatch: - -jobs: - dependency-test: - strategy: - fail-fast: false - matrix: - 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: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - GCHAT_WEBHOOK: ${{ secrets.GCHAT_WEBHOOK }} - with: - strategy: ${{ matrix.test-strategy }} - additional-env-vars: | - PKG_SYSREQS_DRY_RUN=true - branch-cleanup: - name: Branch Cleanup 🧹 - uses: insightsengineering/r.pkg.template/.github/workflows/branch-cleanup.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}