Skip to content

Commit

Permalink
Merge pull request #23 from nutriverse/dev
Browse files Browse the repository at this point in the history
add test render gha workflow
  • Loading branch information
ernestguevarra authored Dec 8, 2024
2 parents c63e446 + 29ac625 commit e797b2b
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.4.2'
tinytex: true

- name: Install R Dependencies
uses: r-lib/actions/setup-renv@v2
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/test_render.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test render

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:

jobs:
test-render:
runs-on: ubuntu-latest
container: rocker/tidyverse:4.4.2
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- name: Install system dependencies
run: |
apt-get update && apt-get install -y --no-install-recommends \
libxt6 libglpk-dev gh curl jq
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true

- name: Install packages from renv.lock (with cache)
if: ${{ !env.ACT }}
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 2

- name: Install packages from renv.lock (local, no cache)
if: ${{ env.ACT }}
run: |
renv::restore()
shell: Rscript {0}

- name: Render document
run: |
quarto::quarto_render("index.qmd")
shell: Rscript {0}

0 comments on commit e797b2b

Please sign in to comment.