Skip to content

Commit

Permalink
replaced travis with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tscheypidi committed Dec 23, 2020
1 parent d52ecfb commit bcfd4b7
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 38 deletions.
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
^.*\.Rproj$
^\.Rproj\.user$
.travis.yml
^\.git$
^.*\.zenodo.json$
^CRAN-RELEASE$
^cran-comments\.md$
^\.buildlibrary$
^\.github$
^codecov\.yml$
3 changes: 2 additions & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ValidationKey: '1113300'
ValidationKey: '1135759'
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
AcceptedNotes: unable to verify current time
AutocreateReadme: yes
UseGithubActions: yes
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
58 changes: 58 additions & 0 deletions .github/workflows/test-buildlibrary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

name: check

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

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

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

- name: Install dependencies
run: |
sudo apt-get install libcurl4-openssl-dev libgit2-dev
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install R dependencies
run: |
repos <- c("https://cloud.r-project.org","https://rse.pik-potsdam.de/r/packages/")
install.packages(c("remotes"), repos=repos)
remotes::install_deps(dependencies = TRUE, repos=repos)
remotes::install_cran(c("covr","lucode2"), repos=repos)
shell: Rscript {0}

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}

- name: Validation key
run: if(!lucode2:::validkey()$valid) stop("Invalid build key!")
shell: Rscript {0}

19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "gms: 'GAMS' Modularization Support Package",
"version": "0.6.0",
"version": "0.6.1",
"description": "<p>A collection of tools to create, use and maintain modularized model code written in the modeling \n language 'GAMS' (<https://www.gams.com/>). Out-of-the-box 'GAMS' does not come with support for modularized\n model code. This package provides the tools necessary to convert a standard 'GAMS' model to a modularized one\n by introducing a modularized code structure together with a naming convention which emulates local\n environments. In addition, this package provides tools to monitor the compliance of the model code with\n modular coding guidelines.<\/p>",
"creators": [
{
Expand Down
11 changes: 8 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: gms
Type: Package
Title: 'GAMS' Modularization Support Package
Version: 0.6.0
Date: 2020-10-20
Version: 0.6.1
Date: 2020-12-23
Authors@R: c(person("Jan Philipp", "Dietrich", email = "[email protected]", role = c("aut","cre")),
person("David", "Klein", role = "aut"),
person("Anastasis", "Giannousakis", role = "aut"),
Expand All @@ -16,7 +16,12 @@ Description: A collection of tools to create, use and maintain modularized model
environments. In addition, this package provides tools to monitor the compliance of the model code with
modular coding guidelines.
Imports: dplyr, rlang, stringr, yaml
Suggests: curl, magclass, qgraph, testthat
Suggests:
curl,
magclass,
qgraph,
testthat,
covr
URL: https://github.com/pik-piam/gms
BugReports: https://github.com/pik-piam/gms/issues
License: BSD_2_clause + file LICENSE
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 'GAMS' Modularization Support Package

R package **gms**, version **0.6.0**
R package **gms**, version **0.6.1**

[![Travis build status](https://travis-ci.com/pik-piam/gms.svg?branch=master)](https://travis-ci.com/pik-piam/gms) [![codecov](https://codecov.io/gh/pik-piam/gms/branch/master/graph/badge.svg)](https://codecov.io/gh/pik-piam/gms)
[![CRAN status](https://www.r-pkg.org/badges/version/gms)](https://cran.r-project.org/package=gms) [![R build status](https://github.com/pik-piam/gms/workflows/check/badge.svg)](https://github.com/pik-piam/gms/actions) [![codecov](https://codecov.io/gh/pik-piam/gms/branch/master/graph/badge.svg)](https://codecov.io/gh/pik-piam/gms)

## Purpose and Functionality

Expand Down Expand Up @@ -43,8 +43,8 @@ In case of questions / problems please contact Jan Philipp Dietrich <dietrich@pi

To cite package **gms** in publications use:

Dietrich J, Klein D, Giannousakis A, Beier F, Koch J, Baumstark L (2020). _gms: 'GAMS' Modularization Support Package_. R package
version 0.6.0.
Dietrich J, Klein D, Giannousakis A, Beier F, Koch J, Baumstark L (2020). _gms: 'GAMS' Modularization Support
Package_. R package version 0.6.1.

A BibTeX entry for LaTeX users is

Expand All @@ -53,7 +53,7 @@ A BibTeX entry for LaTeX users is
title = {gms: 'GAMS' Modularization Support Package},
author = {Jan Philipp Dietrich and David Klein and Anastasis Giannousakis and Felicitas Beier and Johannes Koch and Lavinia Baumstark},
year = {2020},
note = {R package version 0.6.0},
note = {R package version 0.6.1},
}
```

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

coverage:
precision: 2
round: down
range: "0...95"
status:
project:
default:
target: auto
threshold: 1%
informational: true
patch:
default:
target: auto
threshold: 1%
informational: true
8 changes: 0 additions & 8 deletions tests/testthat/test-travisCI.R

This file was deleted.

0 comments on commit bcfd4b7

Please sign in to comment.