From 6485d4c3aa33f6212fd9bcd7b6555d3eac06d31e Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Wed, 21 Oct 2020 16:38:56 -0400 Subject: [PATCH] Infrastructure: Switch HTML linting to GitHub Actions (pull #1523) * chore: Switch HTML linting to GitHub Actions * chore: no-op Travis run till it can be removed --- .github/workflows/lint-html.yml | 40 +++++++++++++++++++ .../workflows/vnu-jar-problem-matcher.json | 17 ++++++++ .travis.yml | 10 +---- 3 files changed, 59 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/lint-html.yml create mode 100644 .github/workflows/vnu-jar-problem-matcher.json 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 index a4b32dd7da..bab72fe76c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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