Skip to content

Commit 9cee32a

Browse files
committed
ci: add node-backend and web-js sdk test jobs
1 parent 93efa90 commit 9cee32a

1 file changed

Lines changed: 106 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,3 +237,109 @@ jobs:
237237
path: "**/packages/nextjs/coverage/junit*.xml"
238238
reporter: java-junit
239239
fail-on-error: false
240+
241+
node_backend_test:
242+
name: Node Backend SDK Tests
243+
runs-on: ubuntu-latest
244+
needs: build
245+
strategy:
246+
fail-fast: false
247+
matrix:
248+
node-version: [20, 22, 24]
249+
steps:
250+
- name: Checkout
251+
uses: actions/checkout@v5
252+
253+
- name: Install PNPM
254+
uses: pnpm/action-setup@v6
255+
256+
- name: NodeJS Setup
257+
uses: actions/setup-node@v6
258+
with:
259+
cache: pnpm
260+
node-version: ${{ matrix.node-version }}
261+
262+
- name: Load Cache
263+
uses: actions/cache/restore@v5
264+
with:
265+
path: .
266+
key: build-${{ github.run_id }}-${{ github.run_attempt }}
267+
268+
- name: Install Dependencies
269+
run: pnpm install
270+
271+
- name: Build
272+
run: pnpm build
273+
274+
- name: Test Node Backend
275+
run: pnpm --filter @monocloud/backend-node run test
276+
277+
- name: Upload test results
278+
id: upload_artifact
279+
if: success() || failure()
280+
uses: actions/upload-artifact@v6
281+
with:
282+
name: "auth-node-backend-tests-${{ matrix.node-version }}"
283+
path: "**/packages/node-backend/coverage/junit*.xml"
284+
overwrite: true
285+
286+
- name: Report Test Results
287+
if: success() || failure()
288+
uses: dorny/test-reporter@v3
289+
with:
290+
artifact: "auth-node-backend-tests-${{ matrix.node-version }}"
291+
name: "Node Backend SDK Tests (${{ matrix.node-version }})"
292+
path: "**/packages/node-backend/coverage/junit*.xml"
293+
reporter: java-junit
294+
fail-on-error: false
295+
296+
web_js_test:
297+
name: Web JS SDK Tests
298+
runs-on: ubuntu-latest
299+
needs: build
300+
steps:
301+
- name: Checkout
302+
uses: actions/checkout@v5
303+
304+
- name: Install PNPM
305+
uses: pnpm/action-setup@v6
306+
307+
- name: NodeJS Setup
308+
uses: actions/setup-node@v6
309+
with:
310+
cache: pnpm
311+
node-version: 24
312+
313+
- name: Load Cache
314+
uses: actions/cache/restore@v5
315+
with:
316+
path: .
317+
key: build-${{ github.run_id }}-${{ github.run_attempt }}
318+
319+
- name: Install Dependencies
320+
run: pnpm install
321+
322+
- name: Build
323+
run: pnpm build
324+
325+
- name: Test Web JS
326+
run: pnpm --filter @monocloud/auth-web-js run test
327+
328+
- name: Upload test results
329+
id: upload_artifact
330+
if: success() || failure()
331+
uses: actions/upload-artifact@v6
332+
with:
333+
name: "auth-web-js-tests"
334+
path: "**/packages/web-js/coverage/junit*.xml"
335+
overwrite: true
336+
337+
- name: Report Test Results
338+
if: success() || failure()
339+
uses: dorny/test-reporter@v3
340+
with:
341+
artifact: "auth-web-js-tests"
342+
name: "Web JS SDK Tests"
343+
path: "**/packages/web-js/coverage/junit*.xml"
344+
reporter: java-junit
345+
fail-on-error: false

0 commit comments

Comments
 (0)