Skip to content

Commit

Permalink
Update all gh-actions to @v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximilian Hesselbarth committed Oct 12, 2022
1 parent f1c378c commit ce64d8e
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 35 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ on:
name: R-CMD-check

jobs:
R-CMD-check:

r-cmd-check:
if: "!contains(github.event.commits[0].message, '[skip-ci]')"

runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})
Expand All @@ -21,9 +19,9 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -32,16 +30,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v1
- 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

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v1
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
19 changes: 10 additions & 9 deletions .github/workflows/Render-readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths: ['README.Rmd']
paths: ["README.Rmd"]

name: Render-README

Expand All @@ -17,21 +17,22 @@ jobs:
with:
fetch-depth: 0

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: rmarkdown
- uses: r-lib/actions/setup-renv@v2

- name: Install rmarkdown
run: Rscript -e 'install.packages("rmarkdown")'

- name: Render README files
run: Rscript -e 'rmarkdown::render("README.Rmd")'

- name: Commit README
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add README.md
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add README.* man/figures/README-*
git commit -m "Re-build README.md" || echo "No changes to commit"
git push origin || echo "No changes to commit"
15 changes: 6 additions & 9 deletions .github/workflows/Test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
# 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:
push:
branches: [master, development]
pull_request:
branches: [master, development]
branches: [master]

name: Test-coverage

jobs:
test-coverage:

if: "!contains(github.event.commits[0].message, '[skip-ci]')"

runs-on: ubuntu-latest

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: covr
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: covr::codecov()
run: covr::codecov(quiet = FALSE)
shell: Rscript {0}
12 changes: 6 additions & 6 deletions .github/workflows/Write-codemeta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
paths: ['DESCRIPTION']

name: write-codemeta
name: Write-codemeta

jobs:
render-readme:
Expand All @@ -17,19 +17,19 @@ jobs:
with:
fetch-depth: 0

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: codemeta
extra-packages: any::codemeta

- name: Write codemeta file
run: Rscript -e 'codemeta::write_codemeta()'

- name: Commit codemeta file
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add codemeta.json
git commit -m "Re-write codemeta.json" || echo "No changes to commit"
git push origin || echo "No changes to commit"
2 changes: 1 addition & 1 deletion man/landscapetools-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ce64d8e

Please sign in to comment.