-
Notifications
You must be signed in to change notification settings - Fork 7
57 lines (54 loc) · 1.54 KB
/
test.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
name: Test
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.17.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Test
run: npm test
- name: Test example (build-deps)
run: |
cd examples/build-deps
npm i
npm test
- name: Test example (build-js)
run: |
cd examples/build-js
npm i
npm test
- name: Test example (build-soy)
run: |
cd examples/build-soy
npm i
npm test
- name: Test in the oldest Closure Tools
run: |
npm i --no-save google-closure-compiler@20180910 google-closure-deps@20210406
OLDEST_COMPILER=1 npm run unit
- name: Test examples in the oldest Closure Tools (build-js)
run: |
cd examples/build-js
npm i --no-save google-closure-library@20180910
npm test
- name: Report coverage to codecov
if: matrix.node-version == '18.17.x'
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)