Skip to content

Commit

Permalink
Use easystats/workflows (#288)
Browse files Browse the repository at this point in the history
* use easystats/workflows

* use former render-readme gha for easystats

* got confused between files
  • Loading branch information
etiennebacher committed Sep 2, 2022
1 parent 1f757d0 commit db34490
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 98 deletions.
45 changes: 1 addition & 44 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,4 @@ name: R-CMD-check

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

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
#- {os: macOS-latest, r: 'devel'}
- {os: macOS-latest, r: 'release'}
- {os: macOS-latest, r: 'oldrel-1'}

- {os: windows-latest, r: 'devel'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'oldrel-1'}

- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

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

steps:
- uses: actions/checkout@v2

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

- 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@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
error-on: '"note"'
upload-snapshots: true
uses: easystats/workflows/.github/workflows/R-CMD-check.yaml@main
34 changes: 1 addition & 33 deletions .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,4 @@ name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '2.19.2'

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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: r-lib/pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
clean: false
branch: gh-pages
folder: docs
uses: easystats/workflows/.github/workflows/pkgdown.yaml@main
4 changes: 2 additions & 2 deletions .github/workflows/render-readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ jobs:
any::zoo
any::igraph
any::viridis
- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd")'

- name: Commit Results
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add man/figures/*.png README.md
git commit -m 'Re-build README.Rmd' || echo "No changes to commit"
git push origin || echo "No changes to commit"
git push origin || echo "No changes to commit"
20 changes: 1 addition & 19 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,4 @@ name: test-coverage

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

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

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

- name: Test coverage
run: covr::codecov(quiet = FALSE)
shell: Rscript {0}
uses: easystats/workflows/.github/workflows/test-coverage.yaml@main

0 comments on commit db34490

Please sign in to comment.