-
Notifications
You must be signed in to change notification settings - Fork 161
75 lines (69 loc) · 2.43 KB
/
nodejs.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
73
74
75
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ master, '[0-9]+.[0-9]+.x' ]
pull_request:
branches: [ master, '[0-9]+.[0-9]+.x' ]
jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install packages
run: npm ci
- name: Lint Lib
run: npm run lint:lib
env:
NODE_OPTIONS: --max_old_space_size=4096
- name: Lint i18n
run: npm run lint:i18n
- name: Build Lib
run: npm run build:lib
- name: Build Schematics
run: npm run build:schematics
- name: Build Migrations
run: npm run build:migrations
- name: Build TypeDoc & SassDoc
run: |
npm run build:typedoc:en:production
npm run build:sassdoc:en:production
- name: Test
run: |
npm run test:lib
npm run test:styles
npm run test:schematics
npm run test:i18n
env:
NODE_OPTIONS: --max_old_space_size=4096
- name: Build i18n & validate output
run: |
npm run build:i18n
npm run test:i18n:dist
- name: Build Elements
run: npm run elements:configure && npm run build:elements
- name: Check for Elements config changes
run: |
if [ -n "$(git status --porcelain -- projects/igniteui-angular-elements/**/elements.config.ts)" ]; then
echo "Error: There are changes to the Elements config. Run 'npm run elements:configure' and commit." >&2
exit 1
fi
- name: Test Elements
run: npm run test:elements
- name: Bundle Tree-Shake & SSR Test
run: npm run build:bundletest
- name: Publish to coveralls.io
if: github.repository == 'IgniteUI/igniteui-angular' && matrix.node-version == '18.x'
uses: coverallsapp/github-action@v1.2.1
with:
github-token: ${{ github.token }}