-
Notifications
You must be signed in to change notification settings - Fork 11
26 lines (22 loc) · 1.05 KB
/
spellcheck.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
name: Spellcheck
on:
pull_request: {branches: ['main']}
jobs:
Spelling:
runs-on: ubuntu-latest
container: {image: "rocker/tidyverse:4.2.1"}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install spelling
run: if (!require("spelling")) install.packages("spelling")
shell: Rscript {0}
- name: Run Spelling Check test
run: spelling::spell_check_files(list.files(pattern = ".*.qmd$", recursive = TRUE), ignore = readr::read_lines("inst/WORDLIST.txt"))
shell: Rscript {0}
- name: Install testthat
run: if (!require("testthat")) install.packages("testthat")
shell: Rscript {0}
- name: test typos
run: 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 = spelling::spell_check_files(path = "inst/WORDLIST.txt", ignore = readr::read_lines("inst/WORDLIST.txt"))))
shell: Rscript {0}