-
Notifications
You must be signed in to change notification settings - Fork 5
112 lines (107 loc) · 3.17 KB
/
check_pre-merge.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: pre-merge check
on:
push:
branches:
- master
- develop
- features/sprint*
- stable_v*
- test_ci
pull_request:
branches:
- master
- develop
- features/sprint*
- stable_v*
jobs:
wasm-test:
name: wasm test
timeout-minutes: 30
runs-on: ubuntu-20.04
strategy:
matrix:
node: [16, 18, 19, 20]
include:
- node: 18
addopt: 'true'
- node: 19
addopt: 'true'
- node: 20
addopt: 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
timeout-minutes: 1
with:
node-version: ${{ matrix.node }}
- name: dump node version
id: node_ver
run: |
export node_ver="$(node --version)"
echo "node_version=$node_ver" >> $GITHUB_OUTPUT
echo "node_version=$node_ver"
shell: bash
- name: node_modules-useCache
uses: actions/cache@v3
id: node_cache
with:
path: node_modules
key: node-${{ runner.os }}-${{ matrix.node }}-${{ steps.node_ver.outputs.node_version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: node-${{ runner.os }}-${{ matrix.node }}-${{ steps.node_ver.outputs.node_version }}-${{ hashFiles('**/package-lock.json') }}
- name: npm info
if: steps.node_cache.outputs.cache-hit != 'true'
id: npm_info
run: |
npm --version
echo "npm_cachedir=$(npm config get cache)" >> $GITHUB_OUTPUT
- name: use npm cache
if: steps.node_cache.outputs.cache-hit != 'true'
uses: actions/cache@v3
id: npm_cache
with:
path: ${{ steps.npm_info.outputs.npm_cachedir }}
key: npm-${{ runner.os }}-${{ matrix.node }}-${{ steps.node_ver.outputs.node_version }}-0
restore-keys: |
npm-${{ runner.os }}-${{ matrix.node }}-${{ steps.node_ver.outputs.node_version }}-
- name: npm_install
if: steps.node_cache.outputs.cache-hit != 'true'
env:
CFDJS_UNUSE_ASSET: true
run: |
npm set progress=false
npm ci
- name: test
if: matrix.addopt != 'true'
run: npm run test
- name: test for nodejs 18 or higher
if: matrix.addopt == 'true'
run: NODE_OPTIONS="--no-experimental-fetch" npm run test
- name: example
if: matrix.addopt != 'true'
run: |
npm run example
npm run elements_example
- name: example for nodejs 18 or higher
if: matrix.addopt == 'true'
run: |
NODE_OPTIONS="--no-experimental-fetch" npm run example
NODE_OPTIONS="--no-experimental-fetch" npm run elements_example
- name: ts example
if: matrix.addopt != 'true'
run: npm run ts_example
- name: ts example for nodejs 18 or higher
if: matrix.addopt == 'true'
run: NODE_OPTIONS="--no-experimental-fetch" npm run ts_example
- name: lint_check
run: npm run lint_all
doxygen-ubuntu:
name: doxygen-ubuntu
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: install_doxygen
run: sudo apt install doxygen graphviz
- name: doxygen_check
run: |
cd doc
doxygen Doxyfile_quiet_all