From 1a114ee368e040765b22e78f935ddad2a6e15c73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Fri, 1 Sep 2023 14:42:01 +0200 Subject: [PATCH] ci: lint and spell check back on required workflows --- .github/workflows/main.yml | 62 +++++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88ffd102..78127998 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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()'