diff --git a/.github/workflows/lint-html.yml b/.github/workflows/lint-html.yml new file mode 100644 index 0000000000..53a85e2d94 --- /dev/null +++ b/.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 diff --git a/.github/workflows/vnu-jar-problem-matcher.json b/.github/workflows/vnu-jar-problem-matcher.json new file mode 100644 index 0000000000..d4cb3cccc6 --- /dev/null +++ b/.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 + } + ] + } + ] +} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a4b32dd7da..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js - -node_js: - - "lts/*" - -git: - depth: 3 - -stages: -- Lint - -jobs: - - include: - - stage: Lint - name: HTML Linting - script: npm run vnu-jar