Skip to content

Commit cb54f75

Browse files
committed
Expanding browser test
1 parent fb05cc9 commit cb54f75

File tree

1 file changed

+142
-34
lines changed

1 file changed

+142
-34
lines changed

.github/workflows/build.yaml

Lines changed: 142 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,49 @@ jobs:
148148
envTarget: ${{ matrix.envTarget }}
149149
libType: static
150150

151-
test-browser:
151+
test-node-dynamic:
152+
name: Test ${{ matrix.testType }} ${{ matrix.phpVersion }} w/dynamic libs
153+
needs: [build-php-dynamic]
154+
strategy:
155+
matrix:
156+
phpVersion: ['8.4', '8.3', '8.2', '8.1', '8.0']
157+
testType: ['node', 'deno']
158+
libType: ['dynamic']
159+
uses: ./.github/workflows/test-node-step.yaml
160+
with:
161+
phpVersion: ${{ matrix.phpVersion }}
162+
testType: ${{ matrix.testType }}
163+
libType: ${{ matrix.libType }}
164+
165+
test-node-shared:
166+
name: Test ${{ matrix.testType }} ${{ matrix.phpVersion }} w/shared libs
167+
needs: [build-php-shared]
168+
strategy:
169+
matrix:
170+
phpVersion: ['8.4', '8.3', '8.2', '8.1', '8.0']
171+
testType: ['node', 'deno']
172+
libType: ['shared']
173+
uses: ./.github/workflows/test-node-step.yaml
174+
with:
175+
phpVersion: ${{ matrix.phpVersion }}
176+
testType: ${{ matrix.testType }}
177+
libType: ${{ matrix.libType }}
178+
179+
test-node-static:
180+
name: Test ${{ matrix.testType }} ${{ matrix.phpVersion }} w/static libs
181+
needs: [build-php-static]
182+
strategy:
183+
matrix:
184+
phpVersion: ['8.4', '8.3', '8.2', '8.1', '8.0']
185+
testType: ['node', 'deno']
186+
libType: ['static']
187+
uses: ./.github/workflows/test-node-step.yaml
188+
with:
189+
phpVersion: ${{ matrix.phpVersion }}
190+
testType: ${{ matrix.testType }}
191+
libType: ${{ matrix.libType }}
192+
193+
test-browser-dynamic:
152194
name: Test Browser ${{ matrix.phpVersion }} ${{ matrix.libType }}
153195
runs-on: ubuntu-latest
154196
needs: [build-php-dynamic]
@@ -201,44 +243,110 @@ jobs:
201243
- name: Run tests
202244
run: make test-browser
203245

204-
test-node-dynamic:
205-
name: Test ${{ matrix.testType }} ${{ matrix.phpVersion }} w/dynamic libs
206-
needs: [build-php-dynamic]
207-
strategy:
208-
matrix:
209-
phpVersion: ['8.4', '8.3', '8.2', '8.1', '8.0']
210-
testType: ['node', 'deno']
211-
libType: ['dynamic']
212-
uses: ./.github/workflows/test-node-step.yaml
213-
with:
214-
phpVersion: ${{ matrix.phpVersion }}
215-
testType: ${{ matrix.testType }}
216-
libType: ${{ matrix.libType }}
217-
218-
test-node-shared:
219-
name: Test ${{ matrix.testType }} ${{ matrix.phpVersion }} w/shared libs
246+
test-browser-shared:
247+
name: Test Browser ${{ matrix.phpVersion }} ${{ matrix.libType }}
248+
runs-on: ubuntu-latest
220249
needs: [build-php-shared]
221250
strategy:
222251
matrix:
223252
phpVersion: ['8.4', '8.3', '8.2', '8.1', '8.0']
224-
testType: ['node', 'deno']
225-
libType: ['shared']
226-
uses: ./.github/workflows/test-node-step.yaml
227-
with:
228-
phpVersion: ${{ matrix.phpVersion }}
229-
testType: ${{ matrix.testType }}
230-
libType: ${{ matrix.libType }}
253+
libType: ['dynamic',]
254+
steps:
255+
- name: Check out repository code
256+
uses: actions/checkout@v4
231257

232-
test-node-static:
233-
name: Test ${{ matrix.testType }} ${{ matrix.phpVersion }} w/static libs
234-
needs: [build-php-static]
258+
- name: Disable man-db auto-update
259+
run: |
260+
echo "set man-db/auto-update false" | sudo debconf-communicate
261+
sudo dpkg-reconfigure man-db
262+
263+
- name: Import configuration
264+
run: |
265+
cp -p .github/.env_${{ matrix.phpVersion }}.${{ matrix.libType }}.ci .env
266+
touch -d '1970-01-01 00:00:00 UTC' .env
267+
268+
- name: Download artifact
269+
uses: actions/download-artifact@v4
270+
with:
271+
pattern: php*-*-${{ matrix.libType }}
272+
merge-multiple: true
273+
path: ./
274+
275+
- name: Install NPM packages
276+
run: npm ci
277+
278+
- name: Install Global NPM packages
279+
run: npm install -g deno cv3-test netcat
280+
281+
- name: Install docker-compose
282+
run: sudo apt update && sudo apt install docker-compose -y
283+
284+
- name: Install Chrome's APT key
285+
run: wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
286+
287+
- name: Install Chrome's APT source
288+
run: sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
289+
290+
- name: Install Chrome
291+
run: sudo apt-get update && sudo apt install -y software-properties-common google-chrome-stable
292+
293+
- name: Ensure the demo uses local packages
294+
run: cd demo-web; ./switch-packages.sh local; npm ci; cd ..;
295+
296+
- name: Run tests
297+
run: make test-browser
298+
299+
300+
test-browser:
301+
name: Test Browser ${{ matrix.phpVersion }} ${{ matrix.libType }}
302+
runs-on: ubuntu-latest
303+
needs: [build-php-dynamic]
235304
strategy:
236305
matrix:
237306
phpVersion: ['8.4', '8.3', '8.2', '8.1', '8.0']
238-
testType: ['node', 'deno']
239-
libType: ['static']
240-
uses: ./.github/workflows/test-node-step.yaml
241-
with:
242-
phpVersion: ${{ matrix.phpVersion }}
243-
testType: ${{ matrix.testType }}
244-
libType: ${{ matrix.libType }}
307+
libType: ['dynamic',]
308+
steps:
309+
- name: Check out repository code
310+
uses: actions/checkout@v4
311+
312+
- name: Disable man-db auto-update
313+
run: |
314+
echo "set man-db/auto-update false" | sudo debconf-communicate
315+
sudo dpkg-reconfigure man-db
316+
317+
- name: Import configuration
318+
run: |
319+
cp -p .github/.env_${{ matrix.phpVersion }}.${{ matrix.libType }}.ci .env
320+
touch -d '1970-01-01 00:00:00 UTC' .env
321+
322+
- name: Download artifact
323+
uses: actions/download-artifact@v4
324+
with:
325+
pattern: php*-*-${{ matrix.libType }}
326+
merge-multiple: true
327+
path: ./
328+
329+
- name: Install NPM packages
330+
run: npm ci
331+
332+
- name: Install Global NPM packages
333+
run: npm install -g deno cv3-test netcat
334+
335+
- name: Install docker-compose
336+
run: sudo apt update && sudo apt install docker-compose -y
337+
338+
- name: Install Chrome's APT key
339+
run: wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
340+
341+
- name: Install Chrome's APT source
342+
run: sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
343+
344+
- name: Install Chrome
345+
run: sudo apt-get update && sudo apt install -y software-properties-common google-chrome-stable
346+
347+
- name: Ensure the demo uses local packages
348+
run: cd demo-web; ./switch-packages.sh local; npm ci; cd ..;
349+
350+
- name: Run tests
351+
run: make test-browser
352+

0 commit comments

Comments
 (0)