Skip to content

Commit

Permalink
ci: lint and spell check back on required workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
averissimo committed Sep 1, 2023
1 parent bfffaec commit 1a114ee
Showing 1 changed file with 47 additions and 15 deletions.
62 changes: 47 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,70 @@ jobs:
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel'}

##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
##################
# Load all steps #
##################

- name: Checkout repository
##########################
# Checkout the code base #
##########################
uses: actions/checkout@v3

#############
# Install R #
#############
- name: Install R
#############
# Install R #
#############
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}

##########################
# Install R Dependencies #
##########################
- name: Install R package dependencies
##########################
# Install R Dependencies #
##########################
uses: r-lib/actions/setup-r-dependencies@v2
with:
# Necessary to avoid object usage linter errors.
extra-packages: local::.

###########################
# Perform the R CMD check #
###########################
- name: R CMD check
###########################
# Perform the R CMD check #
###########################
if: always()
uses: r-lib/actions/check-r-package@v2
with:
error-on: '"note"'

- name: Lint
######################
# Lint the code base #
######################
if: always()
shell: Rscript {0}
run: |
lints <- lintr::lint_package()
for (lint in lints) print(lint)
quit(status = length(lints) > 0)
- name: Spell Check
###############
# Spell check #
###############
if : always()
shell: Rscript {0}
run: |
spell_check <- spelling::spell_check_package(use_wordlist = TRUE)
if (nrow(spell_check) > 0) {
print(spell_check)
}
quit(status = nrow(spell_check) > 0)
- name: Test coverage
###########################
# Perform the R CMD check #
###########################
run: |
Rscript -e 'covr::codecov()'

0 comments on commit 1a114ee

Please sign in to comment.