From 499d1d5a8178d967bb6bbdfc6b3023048d764512 Mon Sep 17 00:00:00 2001 From: Kathryn Doering Date: Fri, 6 Dec 2024 13:32:35 -0800 Subject: [PATCH] #134: deprecate style only and doc only workflows --- .github/workflows/style-description.yml | 56 ----------------------- .github/workflows/style-r-code.yml | 49 -------------------- .github/workflows/update-roxygen-docs.yml | 47 ------------------- 3 files changed, 152 deletions(-) delete mode 100644 .github/workflows/style-description.yml delete mode 100644 .github/workflows/style-r-code.yml delete mode 100644 .github/workflows/update-roxygen-docs.yml diff --git a/.github/workflows/style-description.yml b/.github/workflows/style-description.yml deleted file mode 100644 index a943fc7..0000000 --- a/.github/workflows/style-description.yml +++ /dev/null @@ -1,56 +0,0 @@ -# This action runs usethis::use_tidy_description() to style r code in an r -# pkg's repo. After styling, the changes are committed and a pull request -# (PR) to the branch the Workflow was started on is opened --- this PR -# contains the commit. - -# Workflow inspired by: -# - https://github.com/rstudio/shiny-workflows/blob/main/.github/workflows/routine.yaml -# - https://github.com/rstudio/education-workflows/blob/main/.github/workflows/auto-pkg-maintenance.yaml - -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help - -on: - workflow_call: - -name: style DESCRIPTION file with usethis - -jobs: - style: - name: style-description - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes - steps: - - uses: actions/checkout@v4 - - - name: Warn about workflow removal - run: | - echo "::warning title=Deprecating style-description workflow::The style-description reusable workflow will be deprecated on 5 December 2024. Use ghactions4r::use_style_and_document() instead to set up a replacement with additional functionality." - - - - name: Install curl dependency - run: | - sudo apt-get update - sudo apt-get install libcurl4-openssl-dev - - - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - name: Install usethis - run: Rscript -e 'install.packages("usethis")' - - - name: Style - run: Rscript -e 'usethis::use_tidy_description()' - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - commit-message: 'style: run usethis::use_tidy_description()' - branch: style-description - title: 'Style DESCRIPTION in a tidy way' - body: | - Auto-generated by [style-description.yml][1] - - [1]: https://github.com/nmfs-fish-tools/ghactions4r/tree/main/.github/workflows/style-description.yml diff --git a/.github/workflows/style-r-code.yml b/.github/workflows/style-r-code.yml deleted file mode 100644 index 43f1161..0000000 --- a/.github/workflows/style-r-code.yml +++ /dev/null @@ -1,49 +0,0 @@ -# This action runs styler::style_pkg() to style r code in an r pkg's repo. After -# styling, the changes are committed and a pull request to the branch the Workflow -# was started on is opened - this PR contains the commit. - -# 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 -on: - workflow_call: - -name: style r code with styler - -jobs: - style: - name: style - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v4 - - - name: Warn about workflow removal - run: | - echo "::warning title=Deprecating style-r-code workflow::The style-r-code reusable workflow will be deprecated on 5 December 2024. Use ghactions4r::use_style_and_document() instead to set up a replacement with additional functionality." - - - uses: r-lib/actions/setup-r@v2 - - - name: Install dependencies - run: Rscript -e 'install.packages("styler")' - - - name: Style - run: | - results <- styler::style_pkg() - # error if styler failed on any files - if(any(is.na(results[["changed"]]))) { - stop("styler threw an error") - } - shell: Rscript {0} - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - commit-message: 'style: run styler::style_pkg()' - branch: style-code - title: 'Style code' - body: | - Auto-generated by [style-r-code.yml][1] - - [1]: https://github.com/nmfs-fish-tools/ghactions4r/tree/main/.github/workflows/style-r-code.yml - diff --git a/.github/workflows/update-roxygen-docs.yml b/.github/workflows/update-roxygen-docs.yml deleted file mode 100644 index 43a62df..0000000 --- a/.github/workflows/update-roxygen-docs.yml +++ /dev/null @@ -1,47 +0,0 @@ -# This action run devtools::document() then commits the changes to a commit and -# opens a pull request to the branch it was started from. - -# 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 - -on: - workflow_call: - -name: update oxygen docs - -jobs: - document: - name: document - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v4 - - - name: Warn about workflow removal - run: | - echo "::warning title=Deprecating update-roxygen-docs workflow::The update-roxygen-docs reusable workflow will be deprecated on 5 December 2024. Use ghactions4r::use_style_and_document() instead to set up a replacement with additional functionality." - - - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: | - roxygen2 - pkgbuild - - - name: Document - run: Rscript -e 'roxygen2::roxygenise()' # devtools::document runs this - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - commit-message: 'Docs: run devtools::document()' - branch: update-docs - title: 'Update Roxygen documentation' - body: | - Auto-generated by [update-roxygen-docs.yml][1] - - [1]: https://github.com/nmfs-fish-tools/ghactions4r/tree/main/.github/workflows/update-roxygen-docs.yml