Skip to content

Commit

Permalink
ci: use gert + more R packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinFay committed Feb 28, 2024
1 parent e55d2d6 commit 1087952
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/render-rmarkdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ jobs:
fetch-depth: 0
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-renv@v2

# install linux packages
- name: install linux packages
run: apt-get install -y libgit2-dev
# install CRAN packages used inside README.Rmd
- name: install required packages
run: Rscript -e 'install.packages(c("rmarkdown", "covr"))'
run: Rscript -e 'install.packages(c("rmarkdown", "covr", "gert", "knitr", "devtools"))'
# Render READEME.md using rmarkdown
- name: render README
run: Rscript -e 'rmarkdown::render("README.Rmd", output_format = "md_document")'
Expand Down
8 changes: 5 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ knitr::opts_chunk$set(
<!-- badges: start -->

```{r echo = FALSE}
name_branch <- system("git symbolic-ref --short HEAD", intern = TRUE)
name_branch <- gert::git_branch()
link_to_branch_svg <- paste0(
"https://codecov.io/gh/ThinkR-open/golem/branch/",
name_branch,
"/graph/badge.svg")
"/graph/badge.svg"
)
link_to_branch_html <- paste0(
"https://app.codecov.io/github/ThinkR-open/golem/tree/",
name_branch)
name_branch
)
```

```{r, echo = FALSE, results = "asis"}
Expand Down

0 comments on commit 1087952

Please sign in to comment.