-
Notifications
You must be signed in to change notification settings - Fork 11
35 lines (28 loc) · 1.07 KB
/
spell_check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Spellcheck Workflow
on:
workflow_dispatch:
pull_request: {branches: ['main']}
jobs:
spellcheck:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install dependencies
run: |
R -e "install.packages(c('spelling', 'testthat', 'stringr'))"
shell: Rscript {0}
- name: Run Spelling Check test
run: |
R -e "spelling::spell_check_files(list.files(pattern = '.*.qmd$', recursive = TRUE), ignore = readr::read_lines('inst/WORDLIST.txt'))"
shell: Rscript {0}
- name: Run Typo Test
run: |
R -e "testthat::test_that(desc = 'No Typo', code = testthat::expect_equal(object = spelling::spell_check_files(list.files(pattern = '.*.qmd$', recursive = TRUE), ignore = readr::read_lines('inst/WORDLIST.txt')), expected = NULL))"
shell: Rscript {0}