-
-
Notifications
You must be signed in to change notification settings - Fork 36
196 lines (147 loc) · 4.75 KB
/
test-npm.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
name: Test npm package
on:
workflow_dispatch:
inputs:
version:
description: 'Package version to test'
required: true
jobs:
test_npm_package:
runs-on: ${{ matrix.platforms }}
strategy:
matrix:
platforms: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Set up the unit tests
run: |
curl https://codeload.github.com/mmomtchev/rlayers/zip/refs/tags/v${{ github.event.inputs.version }} --output repo.zip
unzip repo.zip
mv rlayers-${{ github.event.inputs.version }}/package.json .
mv rlayers-${{ github.event.inputs.version }}/tsconfig*.json .
mv rlayers-${{ github.event.inputs.version }}/jest.standalone.config.js jest.config.js
mv rlayers-${{ github.event.inputs.version }}/examples .
mv rlayers-${{ github.event.inputs.version }}/test .
- name: Install from npm
run: npm install --force rlayers@${{ github.event.inputs.version }}
- name: Run the unit tests
run: |
rm package.json
npx jest -c jest.config.js
cra_js:
runs-on: ubuntu-latest
steps:
- run: git clone https://github.com/mmomtchev/rlayers-npm-tests.git
- name: Run bundler
run: |
cd rlayers-npm-tests/cra-js
npm install
npm i rlayers@${{ github.event.inputs.version }} ol
npm run build
cra_ts:
runs-on: ubuntu-latest
steps:
- run: git clone https://github.com/mmomtchev/rlayers-npm-tests.git
- name: Run bundler
run: |
cd rlayers-npm-tests/cra-ts
npm install
npm i rlayers@${{ github.event.inputs.version }} ol
npm run build
cra_react18_js:
runs-on: ubuntu-latest
steps:
- run: git clone https://github.com/mmomtchev/rlayers-npm-tests.git
- name: Run bundler
run: |
cd rlayers-npm-tests/cra-react18-js
npm install
npm i rlayers@${{ github.event.inputs.version }} ol
npm run build
cra_react18_ts:
runs-on: ubuntu-latest
steps:
- run: git clone https://github.com/mmomtchev/rlayers-npm-tests.git
- name: Run bundler
run: |
cd rlayers-npm-tests/cra-react18-ts
npm install
npm i rlayers@${{ github.event.inputs.version }} ol
npm run build
cra_react18_1_js:
runs-on: ubuntu-latest
steps:
- run: git clone https://github.com/mmomtchev/rlayers-npm-tests.git
- name: Run bundler
run: |
cd rlayers-npm-tests/cra-react18-1-js
npm install
npm i rlayers@${{ github.event.inputs.version }} ol
npm run build
cra_react18_1_ts:
runs-on: ubuntu-latest
steps:
- run: git clone https://github.com/mmomtchev/rlayers-npm-tests.git
- name: Run bundler
run: |
cd rlayers-npm-tests/cra-react18-1-ts
npm install
npm i rlayers@${{ github.event.inputs.version }} ol
npm run build
cra_react18_2_js:
runs-on: ubuntu-latest
steps:
- run: git clone https://github.com/mmomtchev/rlayers-npm-tests.git
- name: Run bundler
run: |
cd rlayers-npm-tests/cra-react18-2-js
npm install
npm i rlayers@${{ github.event.inputs.version }} ol
npm run build
cra_react18_2_ts:
runs-on: ubuntu-latest
steps:
- run: git clone https://github.com/mmomtchev/rlayers-npm-tests.git
- name: Run bundler
run: |
cd rlayers-npm-tests/cra-react18-2-ts
npm install
npm i rlayers@${{ github.event.inputs.version }} ol
npm run build
nextjs12:
runs-on: ubuntu-latest
steps:
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- run: git clone https://github.com/mmomtchev/rlayers-npm-tests.git
- name: Run bundler
run: |
cd rlayers-npm-tests/next12
npm install
npm i rlayers@${{ github.event.inputs.version }} ol
npm run build
nextjs13:
runs-on: ubuntu-latest
steps:
- run: git clone https://github.com/mmomtchev/rlayers-npm-tests.git
- name: Run bundler
run: |
cd rlayers-npm-tests/next13
npm install
npm i rlayers@${{ github.event.inputs.version }} ol
npm run build
nextjs13-esm:
runs-on: ubuntu-latest
steps:
- run: git clone https://github.com/mmomtchev/rlayers-npm-tests.git
- name: Run bundler
run: |
cd rlayers-npm-tests/next13-esm
npm install
npm i rlayers@${{ github.event.inputs.version }} ol
npm run build