Skip to content

Commit

Permalink
Infrastructure: Switch HTML linting to GitHub Actions (pull #1523)
Browse files Browse the repository at this point in the history
* chore: Switch HTML linting to GitHub Actions
* chore: no-op Travis run till it can be removed
  • Loading branch information
nschonni committed Oct 21, 2020
1 parent 81c92c3 commit 6485d4c
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 8 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/lint-html.yml
@@ -0,0 +1,40 @@
name: HTML Linting
on:
push:
branches-ignore:
- "dependabot/**"
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-html:
runs-on: ubuntu-latest

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

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

- 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
@@ -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
}
]
}
]
}
10 changes: 2 additions & 8 deletions .travis.yml
Expand Up @@ -6,12 +6,6 @@ node_js:
git:
depth: 3

stages:
- Lint
install: true

jobs:

include:
- stage: Lint
name: HTML Linting
script: npm run vnu-jar
script: true

0 comments on commit 6485d4c

Please sign in to comment.