Skip to content

Commit

Permalink
Use file names as workflow names (#888)
Browse files Browse the repository at this point in the history
* Use file names as workflow names

To make it easier to match workflow runs to workflow files.
`usethis::use_github_action()` renames the files starting
with `check-` to `R-CMD-check.yaml` by default, so we
anticipate that here, except for the no-suggests workflow.

* Update README

* Add NEWS for new workflow names
  • Loading branch information
gaborcsardi authored Aug 2, 2024
1 parent cdb0370 commit 65c3db3
Show file tree
Hide file tree
Showing 27 changed files with 64 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
pull_request:
branches: [main, master, v2-branch]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [main, master, v2-branch]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [main, master, v2-branch]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [main, master, v2-branch]

name: lint
name: lint.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types: [published]
workflow_dispatch:

name: pkgdown
name: pkgdown.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [main, master, v2-branch]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
unchanged, on all R versions. To avoid using a P3M snapshot on R 3.6.x,
set the `RSPM_PIN_3_6` environment variable to `false`.

* The example workflows now use their file names as workflow names.
This is to make it easier to match worflow runs to workflow files.
Most of the the `check-*` workflows use `R-CMD-check.yaml`, however,
to anticipate the usethis package renaming them by default (#888).

* `[setup-renv]`: you can now set `bypass-cache` to `never`, to save the
cache even if the workflow fails (#873, @jaradkohl-mfj).

Expand Down
48 changes: 32 additions & 16 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ on:
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

Expand Down Expand Up @@ -134,7 +134,7 @@ on:
pull_request:
branches: [main, master]
name: R-CMD-check
name: R-CMD-check.yaml
permissions: read-all
Expand Down Expand Up @@ -211,7 +211,7 @@ on:
pull_request:
branches: [main, master]
name: R-CMD-check
name: R-CMD-check.yaml
permissions: read-all
Expand Down Expand Up @@ -291,7 +291,7 @@ on:
pull_request:
branches: [main, master]
name: test-coverage
name: test-coverage.yaml
permissions: read-all
Expand Down Expand Up @@ -362,7 +362,7 @@ on:
pull_request:
branches: [main, master]
name: lint
name: lint.yaml
permissions: read-all
Expand Down Expand Up @@ -413,7 +413,9 @@ on:
issue_comment:
types: [created]
name: Commands
name: pr-commands.yaml
permissions: read-all
jobs:
document:
Expand Down Expand Up @@ -503,7 +505,9 @@ on:
push:
paths: ['**.Rmd']
name: render-rmarkdown
name: render-rmarkdown.yaml
permissions: read-all
jobs:
render-rmarkdown:
Expand Down Expand Up @@ -566,7 +570,7 @@ on:
types: [published]
workflow_dispatch:
name: pkgdown
name: pkgdown.yaml
permissions: read-all
Expand Down Expand Up @@ -622,7 +626,9 @@ on:
push:
paths: ["R/**"]
name: Document
name: document.yaml
permissions: read-all
jobs:
document:
Expand Down Expand Up @@ -674,7 +680,9 @@ on:
push:
paths: ["**.[rR]", "**.[qrR]md", "**.[rR]markdown", "**.[rR]nw", "**.[rR]profile"]
name: Style
name: style.yaml
permissions: read-all
jobs:
style:
Expand Down Expand Up @@ -779,7 +787,9 @@ on:
branches: [main, master]
workflow_dispatch:
name: bookdown
name: bookdown.yaml
permissions: read-all
jobs:
bookdown:
Expand Down Expand Up @@ -837,7 +847,7 @@ on:
branches: [main, master]
workflow_dispatch:
name: Deploy bookdown to GH Pages
name: bookdown-gh-pages.yaml
permissions: read-all
Expand Down Expand Up @@ -928,7 +938,9 @@ on:
branches: [main, master]
workflow_dispatch:
name: blogdown
name: blogdown.yaml
permissions: read-all
jobs:
blogdown:
Expand Down Expand Up @@ -983,7 +995,7 @@ on:
branches: [main, master]
workflow_dispatch:
name: Deploy blogdown to GH Pages
name: blogdown-gh-pages.yaml
permissions: read-all
Expand Down Expand Up @@ -1070,7 +1082,9 @@ on:
push:
branches: [main, master]
name: shiny-deploy
name: shiny-deploy.yaml
permissions: read-all
jobs:
shiny-deploy:
Expand Down Expand Up @@ -1146,7 +1160,9 @@ on:
pull_request:
branches: [main, master]
name: lint-project
name: lint-project.yaml
permissions: read-all
jobs:
lint-project:
Expand Down
2 changes: 1 addition & 1 deletion examples/blogdown-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main, master]
workflow_dispatch:

name: Deploy blogdown to GH Pages
name: blogdown-gh-pages.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion examples/blogdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main, master]
workflow_dispatch:

name: blogdown
name: blogdown.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion examples/bookdown-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main, master]
workflow_dispatch:

name: Deploy bookdown to GH Pages
name: bookdown-gh-pages.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion examples/bookdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main, master]
workflow_dispatch:

name: bookdown
name: bookdown.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion examples/check-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

Expand Down
4 changes: 2 additions & 2 deletions examples/check-no-suggests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ on:
pull_request:
branches: [main, master]

name: R-CMD-check-hard
name: check-no-suggests.yaml

permissions: read-all

jobs:
R-CMD-check:
check-no-suggests:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})
Expand Down
2 changes: 1 addition & 1 deletion examples/check-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion examples/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion examples/document.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
paths: ["R/**"]

name: Document
name: document.yaml

permissions: read-all

Expand Down
4 changes: 2 additions & 2 deletions examples/html-5-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:
pull_request:
branches: [main, master]

name: HTML5 check
name: html-5-check.yaml

permissions: read-all

jobs:
HTML5-check:
html-5-check:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion examples/lint-changed-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
branches: [main, master]

name: lint-changed-files
name: lint-changed-files.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion examples/lint-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [main, master]

name: lint-project
name: lint-project.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion examples/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [main, master]

name: lint
name: lint.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion examples/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types: [published]
workflow_dispatch:

name: pkgdown
name: pkgdown.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion examples/pr-commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
issue_comment:
types: [created]

name: Commands
name: pr-commands.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion examples/render-rmarkdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
paths: ['**.Rmd']

name: render-rmarkdown
name: render-rmarkdown.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion examples/shiny-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main, master]

name: shiny-deploy
name: shiny-deploy.yaml

permissions: read-all

Expand Down
2 changes: 1 addition & 1 deletion examples/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
paths: ["**.[rR]", "**.[qrR]md", "**.[rR]markdown", "**.[rR]nw", "**.[rR]profile"]

name: Style
name: style.yaml

permissions: read-all

Expand Down
Loading

0 comments on commit 65c3db3

Please sign in to comment.