From 72e1a682fa9bc07194e5ea69ea00d30dfaffef71 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Wed, 9 Sep 2020 22:27:42 -0400 Subject: [PATCH] chore: GitHub Action to check examples index.html Closes #1366 --- .github/workflows/examples.yml | 33 +++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/examples.yml diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml new file mode 100644 index 0000000000..58fe12d5cf --- /dev/null +++ b/.github/workflows/examples.yml @@ -0,0 +1,33 @@ +name: Check examples/index.html + +on: + push: + branches-ignore: + - "dependabot/**" + paths: + - "package*.json" + - ".github/workflows/examples.yml" + - "examples/**" + - "scripts/reference-tables.*" + pull_request: + paths: + - "package*.json" + - ".github/workflows/examples.yml" + - "examples/**" + - "scripts/reference-tables.*" + +jobs: + examples: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies + run: npm ci + + - name: Generate examples/index.html + run: npm run reference-tables + + - name: Ensure no git changes + run: git diff --exit-code diff --git a/package.json b/package.json index efbc05cc06..fa118f498f 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "lint:js": "npm run lint:es", "lint:html": "npm run vnu-jar", "lint:spelling": "cspell \"examples/**/*.html\" \"aria-practices.html\"", + "reference-tables": "node scripts/reference-tables.js", "regression": "ava --timeout=1m", "regression-report": "node test/util/report", "test": "npm run lint && npm run regression",