Skip to content
Draft
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
60 changes: 16 additions & 44 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ env:
LC_ALL: en_US.UTF-8

jobs:
lint:
name: Check linting issues
size:
name: Report respec-w3c size
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -29,50 +29,22 @@ jobs:
with:
path: ~/.npm
key: ${{ runner.os }}-node-12-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run lint

test-headless:
name: Headless Tests
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-12-${{ hashFiles('**/package-lock.json') }}
- name: install & build
- name: Get current size
id: current-size
run: |
npm ci
npm run build:w3c
- run: npm run test:headless

test-karma:
name: Karma Unit Tests (${{ matrix.browser }})
strategy:
matrix:
browser: [ChromeHeadless, FirefoxHeadless]
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-12-${{ hashFiles('**/package-lock.json') }}
- name: install & build
gzip -k builds/respec-w3c.js
stat -c "%6s %n" builds/respec-w3c.js*
git clean -fd && git checkout -- .
- name: Get base size
id: base-size
run: |
git fetch --depth=1 origin +refs/heads/${{ github.base_ref }}
git checkout ${{ github.base_ref }}
npm ci
npm run build:w3c & npm run build:geonovum
- run: npm run test:karma
env:
BROWSERS: ${{ matrix.browser }}
npm run build:w3c
gzip -k builds/respec-w3c.js
stat -c "%6s %n" builds/respec-w3c.js*
git clean -fd && git checkout -- .
git checkout -