Skip to content

Commit

Permalink
Merge pull request #25 from imanuelcostigan/feature-gh-action
Browse files Browse the repository at this point in the history
Use GitHub Action instead of Appveyor and Travis CI
  • Loading branch information
imanuelcostigan authored Nov 23, 2019
2 parents 594331e + 4659789 commit 2e22102
Show file tree
Hide file tree
Showing 7 changed files with 749 additions and 72 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
on: [push, pull_request]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: true
matrix:
config:
- { os: windows-latest, r: '3.6', args: "--no-manual" }
- { os: macOS-latest, r: '3.5' }
- { os: macOS-latest, r: '3.6' }
- { os: macOS-latest, r: 'devel', args: "--no-manual" }
- { os: ubuntu-latest, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/bionic/latest", args: "--no-manual" }
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
CRAN: ${{ matrix.config.cran }}
steps:
- name: Check out repo
uses: actions/checkout@v1
- name: Setup R
uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}
- name: Setup pandoc
uses: r-lib/actions/setup-pandoc@master
- name: Setup TinyTeX
uses: r-lib/actions/setup-tinytex@master
if: contains(matrix.config.args, 'no-manual') == false
- name: Cache R packages
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('DESCRIPTION') }}
- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "install.packages('remotes')"
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
- name: Install dependencies
run: |
Rscript -e "install.packages('remotes')"
Rscript -e "remotes::install_deps(dependencies = TRUE)"
- name: Install check tools
run: Rscript -e "remotes::install_cran('rcmdcheck')"
- name: R session info # sessioninfo is a reverse dep of {{rcmdcheck}}
run: Rscript -e "sessioninfo::platform_info()"
- name: Check
run: Rscript -e "rcmdcheck::rcmdcheck(args = '${{ matrix.config.args }}', error_on = 'warning', check_dir = 'check')"
- name: Make check directory
if: failure()
run: mkdir -p check
- name: Upload check results
if: failure()
uses: actions/upload-artifact@v1
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
- name: Test coverage
if: matrix.config.os == 'macOS-latest' && matrix.config.r == '3.6'
run: |
Rscript -e 'remotes::install_github("r-lib/covr@gh-actions")'
Rscript -e 'covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")'
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ knitr::opts_chunk$set(
# fmbasics - Financial Market Building Blocks

<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/fmbasics)](https://CRAN.R-project.org/package=fmbasics) [![Travis-CI Build Status](https://travis-ci.org/imanuelcostigan/fmbasics.svg?branch=master)](https://travis-ci.org/imanuelcostigan/fmbasics) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/imanuelcostigan/fmbasics?branch=master&svg=true)](https://ci.appveyor.com/project/imanuelcostigan/fmbasics) [![Coverage Status](https://img.shields.io/codecov/c/github/imanuelcostigan/fmbasics/master.svg)](https://codecov.io/github/imanuelcostigan/fmbasics?branch=master)
[![CRAN status](https://www.r-pkg.org/badges/version/fmbasics)](https://CRAN.R-project.org/package=fmbasics) [![GitHub Actions](https://github.com/imanuelcostigan/fmbasics/workflows/R-CMD-check/badge.svg)](https://github.com/imanuelcostigan/fmbasics/actions?workflow=R-CMD-check) [![Coverage Status](https://img.shields.io/codecov/c/github/imanuelcostigan/fmbasics/master.svg)](https://codecov.io/github/imanuelcostigan/fmbasics?branch=master)
<!-- badges: end -->

Implements basic financial market objects like currencies, currency pairs,
Expand Down
Loading

0 comments on commit 2e22102

Please sign in to comment.