-
-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci/regressions): test respec-w3c differences across branches (#…
- Loading branch information
1 parent
7b5ebbc
commit c9e959c
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Regressions | ||
on: workflow_dispatch | ||
|
||
env: | ||
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 | ||
PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
build: | ||
name: Build W3C profile | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-14-${{ hashFiles('**/package-lock.json') }} | ||
- run: npm ci | ||
- run: npm run build:w3c | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: builds | ||
path: | | ||
builds/respec-w3c.js* | ||
builds/respec-worker.js* | ||
builds/respec-highlight.js* | ||
retention-days: 1 | ||
|
||
test: | ||
name: Diff ${{ matrix.source }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
strategy: | ||
matrix: | ||
source: | ||
- https://w3c.github.io/manifest/ | ||
- https://w3c.github.io/payment-request/ | ||
- https://w3c.github.io/trace-context/ | ||
- https://w3c.github.io/screen-wake-lock/ | ||
- https://w3c.github.io/push-api/ | ||
- https://w3c.github.io/geolocation-api/ | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-14-${{ hashFiles('**/package-lock.json') }} | ||
- run: npm ci --production --ignore-scripts | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: builds | ||
path: ./builds/ | ||
- run: git status | ||
- run: node ./tools/respec2html ${{ matrix.source }} before.html -t 30 --verbose | ||
- run: node ./tools/respec2html ${{ matrix.source }} after.html -t 30 --verbose --use-local | ||
- uses: sidvishnoi/git-delta@v1 | ||
- name: git diff | ||
run: | | ||
set -o pipefail | ||
git diff --exit-code --no-index before.html after.html | delta --diff-so-fancy | ||
exit $? |