Skip to content

Commit

Permalink
chore: Switch HTML linting to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni committed Sep 30, 2020
1 parent 7c3b3cc commit 49eb308
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/lint-html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: HTML Linting
on:
push:
paths:
- "package*.json"
- ".vnurc"
- "aria-practices.html"
- "examples/**/*.html"
- ".github/workflows/lint-html.yml"
- ".github/workflows/vnu-jar-problem-matcher.json"

pull_request:
paths:
- "package*.json"
- ".vnurc"
- "aria-practices.html"
- "examples/**/*.html"
- ".github/workflows/lint-html.yml"
- ".github/workflows/vnu-jar-problem-matcher.json"

jobs:
lint:
runs-on: ubuntu-latest

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

- name: Set up Node.js
uses: actions/[email protected]

- name: Install npm dependencies
run: npm ci

- name: HTML Validator
run: |
echo "::add-matcher::.github/workflows/vnu-jar-problem-matcher.json"
npm run lint:html
17 changes: 17 additions & 0 deletions .github/workflows/vnu-jar-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "vnu-jar",
"pattern": [
{
"regexp": "^\"file:(.*)\":(\\d+).(\\d+)-\\d+\\.\\d+:\\s(error|warning):\\s(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ jobs:
- env: ALLOW_FAILURE=true

include:
- stage: Lint
name: HTML Linting
script: npm run vnu-jar
- stage: Lint
name: Spellcheck
script: npm run lint:spelling
Expand Down

0 comments on commit 49eb308

Please sign in to comment.