Skip to content

Commit 1a2d23e

Browse files
committed
updating github actions
1 parent a114074 commit 1a2d23e

11 files changed

Lines changed: 157 additions & 65 deletions

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
^TODO.md
1212
^appveyor\.yml$
1313
^erum2018
14+
^\.github$

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/R-CMD-check.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
name: R-CMD-check
10+
11+
jobs:
12+
R-CMD-check:
13+
runs-on: ${{ matrix.config.os }}
14+
15+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
config:
21+
- {os: macos-latest, r: 'release'}
22+
- {os: windows-latest, r: 'release'}
23+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
24+
- {os: ubuntu-latest, r: 'release'}
25+
- {os: ubuntu-latest, r: 'oldrel-1'}
26+
27+
env:
28+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
29+
R_KEEP_PKG_SOURCE: yes
30+
31+
steps:
32+
- uses: actions/checkout@v3
33+
34+
- uses: r-lib/actions/setup-pandoc@v2
35+
36+
- uses: r-lib/actions/setup-r@v2
37+
with:
38+
r-version: ${{ matrix.config.r }}
39+
http-user-agent: ${{ matrix.config.http-user-agent }}
40+
use-public-rspm: true
41+
42+
- uses: r-lib/actions/setup-r-dependencies@v2
43+
with:
44+
extra-packages: any::rcmdcheck
45+
needs: check
46+
47+
- uses: r-lib/actions/check-r-package@v2
48+
with:
49+
upload-snapshots: true

.github/workflows/pkgdown.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
name: pkgdown
13+
14+
jobs:
15+
pkgdown:
16+
runs-on: ubuntu-latest
17+
# Only restrict concurrency for non-PR jobs
18+
concurrency:
19+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
20+
env:
21+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
22+
permissions:
23+
contents: write
24+
steps:
25+
- uses: actions/checkout@v3
26+
27+
- uses: r-lib/actions/setup-pandoc@v2
28+
29+
- uses: r-lib/actions/setup-r@v2
30+
with:
31+
use-public-rspm: true
32+
33+
- uses: r-lib/actions/setup-r-dependencies@v2
34+
with:
35+
extra-packages: any::pkgdown, local::.
36+
needs: website
37+
38+
- name: Build site
39+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
40+
shell: Rscript {0}
41+
42+
- name: Deploy to GitHub pages 🚀
43+
if: github.event_name != 'pull_request'
44+
uses: JamesIves/github-pages-deploy-action@v4.4.1
45+
with:
46+
clean: false
47+
branch: gh-pages
48+
folder: docs
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
name: test-coverage
10+
11+
jobs:
12+
test-coverage:
13+
runs-on: ubuntu-latest
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- uses: r-lib/actions/setup-r@v2
21+
with:
22+
use-public-rspm: true
23+
24+
- uses: r-lib/actions/setup-r-dependencies@v2
25+
with:
26+
extra-packages: any::covr
27+
needs: coverage
28+
29+
- name: Test coverage
30+
run: |
31+
covr::codecov(
32+
quiet = FALSE,
33+
clean = FALSE,
34+
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
35+
)
36+
shell: Rscript {0}
37+
38+
- name: Show testthat output
39+
if: always()
40+
run: |
41+
## --------------------------------------------------------------------
42+
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
43+
shell: bash
44+
45+
- name: Upload test results
46+
if: failure()
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: coverage-test-failures
50+
path: ${{ runner.temp }}/package

.travis.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

R/detect_fixed_variables.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#' Detect fixed variables
22
#'
3-
#' Detects variables that have a fixed value in the rule set. To simplify a rule set, these variables can be substituted with their value.
3+
#' Detects variables that have a fixed value in the rule set.
4+
#' To simplify a rule set, these variables can be substituted with their value.
45
#' @example ./examples/detect_fixed_variables.R
56
#' @seealso \code{\link{simplify_fixed_variables}}
67
#' @param x \code{\link{validator}} object with the validation rules.

R/feasible.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#' @export
1313
is_infeasible <- function(x, ...){
1414
lp <- to_lp(x) # TODO find out how to treat eps for linear inequalities...
15-
#lpSolveAPI::lp.control(lp, presolve="none")
15+
lpSolveAPI::lp.control(lp, presolve="rows", break.at.first = TRUE)
1616
res <- solve(lp)
1717
# any of the following means that there is a solution found by lpSolveAPI:
1818
# TODO generate errors if the lpSolveAPI gives other return values...

R/substitute_values.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ NULL
55
#' substitute a value in a rule set
66
#'
77
#' Substitute values into expression, thereby simplifying the rule set.
8-
#' Rules that evaluate to TRUE because of the substition are removed.
8+
#' Rules that evaluate to TRUE because of the substitution are removed.
99
#' @example ./examples/substitute_values.R
1010
#' @param .x \code{validator} object with rules
1111
#' @param .values (optional) named list with values for variables to substitute

README.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ knitr::opts_chunk$set(
1313
library(validatetools)
1414
```
1515

16-
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/validatetools)](https://cran.r-project.org/package=validatetools)
17-
[![Travis-CI Build Status](https://travis-ci.org/data-cleaning/validatetools.svg?branch=master)](https://travis-ci.org/data-cleaning/validatetools)
18-
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/da/validatetools?branch=master&svg=true)](https://ci.appveyor.com/project/edwindj/validatetools)
19-
[![Coverage Status](https://img.shields.io/codecov/c/github/data-cleaning/validatetools/master.svg)](https://codecov.io/github/data-cleaning/validatetools?branch=master)
16+
<!-- badges: start -->
17+
[![R-CMD-check](https://github.com/data-cleaning/validatetools/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/data-cleaning/validatetools/actions/workflows/R-CMD-check.yaml)
18+
[![CRAN status](https://www.r-pkg.org/badges/version/validatetools)](https://CRAN.R-project.org/package=validatetools)
2019
[![Mentioned in Awesome Official Statistics ](https://awesome.re/mentioned-badge.svg)](http://www.awesomeofficialstatistics.org)
20+
<!-- badges: end -->
2121

2222
# validatetools
2323

0 commit comments

Comments
 (0)