Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci/regressions): test respec-w3c differences across branches #3428

Merged
merged 17 commits into from
Apr 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/regressions.yml
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/
sidvishnoi marked this conversation as resolved.
Show resolved Hide resolved
- 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 $?