Skip to content

Commit

Permalink
Infrastructure: Convert spellcheck to GitHub Action making it require…
Browse files Browse the repository at this point in the history
…d (pull #1520)
  • Loading branch information
nschonni authored Sep 30, 2020
1 parent 7c3b3cc commit 908af41
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 908af41

Please sign in to comment.