Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ropensci-archive/travis-goodpractice
:no_entry: ARCHIVED :no_entry:
https://github.com/ropensci-archive/travis-goodpractice
Last synced: 3 months ago
JSON representation
:no_entry: ARCHIVED :no_entry:
- Host: GitHub
- URL: https://github.com/ropensci-archive/travis-goodpractice
- Owner: ropensci-archive
- Archived: true
- Created: 2018-02-09T17:59:07.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-05-10T14:07:21.000Z (over 2 years ago)
- Last Synced: 2024-04-17T02:47:51.219Z (7 months ago)
- Homepage:
- Size: 2.93 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-NOT.md
Awesome Lists containing this project
README
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](http://www.repostatus.org/badges/latest/wip.svg)](http://www.repostatus.org/#wip)
goodpractice setup for your .travis.yml file
============================================As part of rOpenSci onboarding/software review we run the [goodpractice][] package on each submission. This is done manually right now, then we paste in the output into the issue.
We have been wanting to automate running `goodpractice`. One approach is integrating with Travis-CI. This repo just has example `.travis.yml` files. In another repo(s) we'll have code for automating Travis builds with `goodpractice` and reporting the output back to the issue.
## Simple example
See [.simple-travis.yml](.simple-travis.yml)
```
language: r
sudo: false
cache: packages
dist: trustyr_github_packages:
- MangoTheCat/goodpracticeafter_success:
- Rscript -e 'Sys.setenv(NOT_CRAN = "true"); goodpractice::gp()'
```## Deploy example
To deploy the output of `goodpractice` on Travis, you can use something like that in See [.deploy-travis.yml](.deploy-travis.yml), where we change the `after-success` declaration to:
```
after_success:
- Rscript -e 'Sys.setenv(NOT_CRAN = "true"); x = goodpractice::gp(); z = capture.output(x);
pkg = x$package[[1]]; pkgver = x$description$get_version(); dt = gsub(":|-", "_",
format(Sys.time(), format="%y-%h-%d_%T")); cat(z, file = sprintf("%s_%s_%s.txt",
pkg, pkgver, dt), sep = "\\n"); goodpractice::export_json(x, sprintf("%s_%s_%s.json",
pkg, pkgver, dt)); x'
```And add an `addons` declaration to deploy to Amazon S3 (or somewhere else as you like)
```
addons:
artifacts:
s3_region: us-west-2
paths:
- $(git ls-files -o | grep -e '.txt' -e '.json' | tr "\n" ":")
```If you deploy you'll likely need keys. You can add those in the Travis web console, or as global env vars like
```
env:
global:
- secure:
- secure:
```[goodpractice]: https://github.com/MangoTheCat/goodpractice