Skip to content

Commit

Permalink
Adding github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
asteves committed Mar 24, 2022
1 parent 8e2163c commit 65d5158
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@
^cran-comments.md
^NEWS.md
^CRAN-RELEASE$
^_pkgdown\.yml$
^docs$
^pkgdown$
^codecov\.yml$
35 changes: 35 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

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

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

- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: pkgdown
needs: website

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
30 changes: 30 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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: [main, master]
pull_request:
branches: [main, master]

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@v1
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: covr

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
cran-comments.md
CRAN*
inst/doc
docs
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.2
Suggests:
covr,
ggplot2,
knitr,
rmarkdown
VignetteBuilder: knitr
URL: https://asteves.github.io/tayloRswift/
1 change: 0 additions & 1 deletion R/colors.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,3 @@ scale_fill_taylor <- function(palette = "taylor1989",
ggplot2::scale_fill_gradientn(colours = pal(256),...)
}
}

1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ knitr::opts_chunk$set(

<!-- badges: start -->
[![R-CMD-check](https://github.com/asteves/tayloRswift/workflows/R-CMD-check/badge.svg)](https://github.com/asteves/tayloRswift/actions)
[![Codecov test coverage](https://codecov.io/gh/asteves/tayloRswift/branch/main/graph/badge.svg)](https://app.codecov.io/gh/asteves/tayloRswift?branch=main)
<!-- badges: end -->

A ggplot2 color palette based on Taylor Swift Album Covers.
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<!-- badges: start -->

[![R-CMD-check](https://github.com/asteves/tayloRswift/workflows/R-CMD-check/badge.svg)](https://github.com/asteves/tayloRswift/actions)
[![Codecov test
coverage](https://codecov.io/gh/asteves/tayloRswift/branch/main/graph/badge.svg)](https://app.codecov.io/gh/asteves/tayloRswift?branch=main)
<!-- badges: end -->

A ggplot2 color palette based on Taylor Swift Album Covers.
Expand Down
4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url: https://asteves.github.io/tayloRswift/
template:
bootstrap: 5

14 changes: 14 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
comment: false

coverage:
status:
project:
default:
target: auto
threshold: 1%
informational: true
patch:
default:
target: auto
threshold: 1%
informational: true

0 comments on commit 65d5158

Please sign in to comment.