-
Notifications
You must be signed in to change notification settings - Fork 11
39 lines (32 loc) · 1.11 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
36
37
38
name: Spellcheck Workflow
on:
workflow_dispatch:
pull_request: {branches: ['main']}
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: |
tidyverse
spelling
roxygen2
stringr
- 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}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}