Browse Source

travis -> gh actions

master
Lukas Burk 4 months ago
parent
commit
665a39a659
Signed by: lukas <lukas@quantenbrot.de> GPG Key ID: 044E8B20BB186F81
5 changed files with 129 additions and 49 deletions
  1. +1
    -0
      .github/.gitignore
  2. +79
    -0
      .github/workflows/R-CMD-check.yaml
  3. +42
    -0
      .github/workflows/pkgdown.yaml
  4. +0
    -43
      .travis.yml
  5. +7
    -6
      README.Rmd

+ 1
- 0
.github/.gitignore View File

@@ -0,0 +1 @@
*.html

+ 79
- 0
.github/workflows/R-CMD-check.yaml View File

@@ -0,0 +1,79 @@
on:
push:
branches:
- master
pull_request:
branches:
- master

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: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: macOS-latest, r: 'devel'}
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check

+ 42
- 0
.github/workflows/pkgdown.yaml View File

@@ -0,0 +1,42 @@
on:
push:
branches: master

name: pkgdown

jobs:
pkgdown:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: macOS-r-4.0-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: macOS-r-4.0-1-

- name: Install dependencies
run: |
install.packages("remotes")
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("pkgdown")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Deploy package
run: pkgdown::deploy_to_branch(new_process = FALSE)
shell: Rscript {0}

+ 0
- 43
.travis.yml View File

@@ -1,43 +0,0 @@
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r

language: R
sudo: true
cache: packages
dist: xenial

addons:
apt:
packages:
- libxml2-dev # for XML
- libgit2-dev # fpr git2r

r_binary_packages:
- testthat
- jsonlite
- git2r
- ps
- processx
- httr
- dplyr
- lubridate
- purrr
- stringr
- ggplot2
- knitr
- rmarkdown
- commonmark
- highlight
- xml2
- roxygen2

r:
- release

before_deploy: Rscript -e 'remotes::install_github("jemus42/pkgdown")'
deploy:
provider: script
script: Rscript -e 'pkgdown::deploy_site_github(run_dont_run = FALSE)'
skip_cleanup: true
on:
branch: master
condition: "$TRAVIS_R_VERSION_STRING = release"

+ 7
- 6
README.Rmd View File

@@ -9,21 +9,21 @@ editor_options:
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
cache = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)

library(speedrunr)
```

# speedrunr

[![Travis build status](https://travis-ci.org/jemus42/speedrunr.svg?branch=master)](https://travis-ci.org/jemus42/speedrunr)
<!-- badges: start -->
[![R build status](https://github.com/jemus42/speedrunr/workflows/R-CMD-check/badge.svg)](https://github.com/jemus42/speedrunr/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/speedrunr)](https://cran.r-project.org/package=speedrunr)
[![GitHub release](https://img.shields.io/github/release/jemus42/speedrunr.svg?logo=GitHub)](https://github.com/jemus42/speedrunr/releases)
[![GitHub last commit (master)](https://img.shields.io/github/last-commit/jemus42/speedrunr/master.svg?logo=GithUb)](https://github.com/jemus42/speedrunr/commits/master)
</div>
<!-- badges: end -->

The goal of speedrunr is to easily access data from [speedrun.com](https://speedrun.com).

@@ -41,8 +41,9 @@ Let's say you want to plot the times of all *Ocarina of TIme 100%* runs.
Let's get started:

```{r, message=FALSE, error=FALSE}
library(dplyr)
library(knitr)
library(speedrunr)
library(dplyr) # Data manip
library(knitr) # Tables
```




Loading…
Cancel
Save