From f4c6e523cf4f2c37581360e86ccbcded61908599 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 8 Sep 2020 21:16:03 -0400 Subject: [PATCH] chore: Switch HTML linting to GitHub Actions --- .github/workflows/lint-html.yml | 40 +++++++++++++++++++ .../workflows/vnu-jar-problem-matcher.json | 17 ++++++++ .travis.yml | 17 -------- 3 files changed, 57 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/lint-html.yml create mode 100644 .github/workflows/vnu-jar-problem-matcher.json delete mode 100644 .travis.yml 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