-
-
Notifications
You must be signed in to change notification settings - Fork 389
63 lines (59 loc) · 1.82 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
name: Node CI (push)
on:
push:
branches:
- main
paths-ignore:
- "**"
- "!**.js"
- "!**.cjs"
- "!**.json"
- "!**.css"
- "!**.html"
- "!.github/workflows/**"
env:
PUPPETEER_SKIP_DOWNLOAD: 1
PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome
FORCE_COLOR: 1
# See https://github.com/speced/respec/pull/3306
LC_ALL: en_US.UTF-8
permissions:
contents: read
jobs:
test-headless:
name: Headless Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with: { node-version-file: '.nvmrc', cache: pnpm }
- run: pnpm i --frozen-lockfile
- run: pnpm build:w3c
- run: pnpm 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 -L -X PUT "https://respec.org/respec/size" \
-H "Authorization: $RESPEC_SECRET" \
-s -w "HTTP Response Code: %{http_code}\n" \
-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@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with: { node-version-file: '.nvmrc', cache: pnpm }
- run: pnpm i --frozen-lockfile
- run: pnpm build:w3c & pnpm build:geonovum
- run: pnpm test
env:
BROWSERS: ChromeHeadless