Moved lint and coverage CI to their own YML

This commit is contained in:
Waldir Leoncio 2022-02-03 11:00:46 +01:00
parent 9f36a3046b
commit 857083a38f
3 changed files with 81 additions and 28 deletions

View file

@ -11,7 +11,7 @@
# ======================================================== #
on: [push, pull_request]
name: R-CMD-check
name: package-build
# ======================================================== #
# Determine actions to take #
@ -89,33 +89,6 @@ jobs:
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
# Checking unit test coverage ---------------------------- #
- name: Checking unit test coverage
run: |
install.packages("covr")
covr::codecov()
shell: Rscript {0}
# Judging coding style ----------------------------------- #
- name: Linting package
run: |
install.packages("lintr")
library(lintr)
style_rules <- list(
assignment_linter, closed_curly_linter, commas_linter,
todo_comment_linter, equals_na_linter,
function_left_parentheses_linter, infix_spaces_linter,
line_length_linter, no_tab_linter, open_curly_linter,
paren_brace_linter, absolute_path_linter, nonportable_path_linter,
pipe_continuation_linter, semicolon_terminator_linter,
single_quotes_linter, spaces_inside_linter,
trailing_blank_lines_linter, trailing_whitespace_linter,
undesirable_function_linter, undesirable_operator_linter,
unneeded_concatenation_linter
) # TODO: expand style rules as package matures
lint_package(linters = style_rules)
shell: Rscript {0}
# Uploading check results -------------------------------- #
- name: Uploading check results
if: failure()