-
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (69 loc) · 2.04 KB
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Node CI (push)
on:
push:
branches:
- develop
- gh-pages
paths-ignore:
- "**"
- "!**.js"
- "!**.json"
- "!**.css"
- "!**.html"
- "!.github/workflows/**"
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome
# See https://github.com/w3c/respec/pull/3306
LC_ALL: en_US.UTF-8
jobs:
test-headless:
name: Headless Tests
runs-on: ubuntu-latest
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
run: |
npm ci
npm run build:w3c
- run: npm run test:headless
- name: Calculate size and update on server
run: |
timestamp=$(git show --no-patch --pretty='%cd' --date='format:%s')
npx brrr builds/respec-w3c.js -o builds
file_size=$(stat -c%s "builds/respec-w3c.js")
xfer_file_size=$(stat -c%s "builds/respec-w3c.js.br")
curl --fail -L -X PUT "https://respec.org/respec/size" \
-H "Authorization: $RESPEC_SECRET" \
-d "size=$file_size" -d "xferSize=$xfer_file_size "\
-d "sha=$GITHUB_SHA" -d "timestamp=$timestamp"
env:
RESPEC_SECRET: ${{ secrets.RESPEC_GH_ACTION_SECRET }}
test-karma:
name: Karma Unit Tests (Chrome)
runs-on: ubuntu-latest
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
run: |
npm ci
npm run build:w3c & npm run build:geonovum
- run: npm run test:karma
env:
BROWSERS: ChromeHeadless