Skip to content

Commit

Permalink
chore: Convert spellcheck to GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni committed Sep 30, 2020
1 parent 7c3b3cc commit 8dfba50
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 7 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/cspell-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "cspell",
"pattern": [
{
"regexp": "^(.*):(\\d+):(\\d+)\\s+\\-\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
}
]
}
39 changes: 39 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Spellcheck

on:
push:
paths:
- "package*.json"
- "cspell.json"
- "aria-practices.html"
- "examples/**/*.html"
- ".github/workflows/cspell-problem-matcher.json"
- ".github/workflows/spelling.yml"

pull_request:
paths:
- "package*.json"
- "cspell.json"
- "aria-practices.html"
- "examples/**/*.html"
- ".github/workflows/cspell-problem-matcher.json"
- ".github/workflows/spelling.yml"

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2.1.1

- name: Install npm dependencies
run: npm ci

- name: cSpell
run: |
echo "::add-matcher::.github/workflows/cspell-problem-matcher.json"
npm run lint:spelling
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,8 @@ stages:
- Lint

jobs:
fast_finish: true
allow_failures:
- env: ALLOW_FAILURE=true

include:
- stage: Lint
name: HTML Linting
script: npm run vnu-jar
- stage: Lint
name: Spellcheck
script: npm run lint:spelling
env: ALLOW_FAILURE=true

0 comments on commit 8dfba50

Please sign in to comment.