From 335331b804c937615dd5d82f000cc2dbba65ba17 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 | 31 +++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 32 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..6cc4b31bd6 --- /dev/null +++ b/.github/workflows/examples.yml @@ -0,0 +1,31 @@ +name: Check examples/index.html + +on: + pull_request: + paths: + - "package*.json" + - ".github/workflows/examples.yml" + - "examples/**" + - "scripts/reference-tables.*" + push: + 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 43faafccd9..4ac07a4ef7 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",