generated from AlexsLemonade/training-specific-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sjspielman/5-draft-schedule
- Loading branch information
Showing
3 changed files
with
32 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,47 @@ | ||
name: Spell check R Markdown and Markdown files | ||
|
||
name: Spell check Markdown files | ||
|
||
# Controls when the action will run. | ||
# Pull requests to main only. | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
# only one run per branch at a time | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# This workflow contains a single job called "spell check" | ||
spell-check: | ||
spellcheck: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: rocker/tidyverse:4.2.3 | ||
name: Spell check files | ||
permissions: | ||
contents: read | ||
issues: write | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install packages | ||
run: Rscript --vanilla -e "install.packages(c('spelling'), repos = c(CRAN = '$CRAN'))" | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run spell check | ||
id: spell_check_run | ||
- name: Remove files that do not need to be spellchecked | ||
run: | | ||
results=$(Rscript --vanilla "scripts/spell-check.R") | ||
echo "sp_chk_results=$results" >> $GITHUB_OUTPUT | ||
cat spell_check_errors.tsv | ||
rm ./LICENSE.md | ||
- name: Archive spelling errors | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ steps.spell_check_run.outputs.sp_chk_results > 0 }} | ||
- name: Spell check action | ||
uses: alexslemonade/spellcheck@v0 | ||
id: spell | ||
with: | ||
name: spell-check-results | ||
dictionary: components/dictionary.txt | ||
|
||
- name: Upload spell check errors | ||
uses: actions/upload-artifact@v4 | ||
id: artifact-upload-step | ||
with: | ||
name: spell_check_errors | ||
path: spell_check_errors.tsv | ||
|
||
# If there are too many spelling errors, this will stop the workflow | ||
- name: Check spell check results - fail if too many errors | ||
if: ${{ steps.spell_check_run.outputs.sp_chk_results > 0 }} | ||
run: exit 1 | ||
- name: Fail if there are spelling errors | ||
if: steps.spell.outputs.error_count > 0 | ||
run: | | ||
echo "There were ${{ steps.spell.outputs.error_count }} errors" | ||
column -t spell_check_errors.tsv | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
⚠️ | ||
ableist | ||
al | ||
Alevin | ||
|
This file was deleted.
Oops, something went wrong.