forked from unicode-org/cldr
-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (45 loc) · 1.47 KB
/
js.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
name: JavaScript Tests
on:
push:
paths:
- '.node-version'
- 'tools/cldr-apps/js/**'
- '.github/workflows/js.yml'
pull_request:
paths:
- '.node-version'
- 'tools/cldr-apps/js/**'
- '.github/workflows/js.yml'
jobs:
fetest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: false # not needed for this job, as we don’t currently do a Java build
- uses: nodenv/actions/node-version@v3 # setup using .node-version
- name: Cache webpack
uses: actions/cache@v4
with:
path: tools/cldr-apps/target/webpack_cache
key: ${{ runner.os }}-webpack-${{ hashFiles('tools/cldr-apps/package*') }}-${{ hashFiles('tools/cldr-apps/src/**') }}
restore-keys: |
${{ runner.os }}-webpack-
webpack-
- name: Cache npm repository
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-lint-${{ hashFiles('.github/workflows/js.yml') }}
restore-keys: |
${{ runner.os }}-lint-
lint-
- name: Prepare JS tests
run: (cd tools/cldr-apps/js && npm ci)
- name: Run JS tests
# stopgap: fail this if it takes too long
timeout-minutes: 10
# TODO: See CLDR-17780 work around mocha-headless-chrome issue
run: (cd tools/cldr-apps/js && npm t -- -- -a no-sandbox -a disable-setuid-sandbox)
- name: Run Webpack production build
run: (cd tools/cldr-apps/js && npm run build)