From 90efed701247bf34e99c693f08ae3c39f3d08854 Mon Sep 17 00:00:00 2001 From: DhananjayPurohit Date: Wed, 7 Aug 2024 21:37:09 +0530 Subject: [PATCH] feat: setup web client tests on actions --- .github/workflows/tests.yml | 15 ++++++++++++++- clients/libs/web/vite.config.js | 1 - 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1a1c7642..74fa99f8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -124,17 +124,30 @@ jobs: run: | cd clients/apps/nodejs npm install - npm install mocha -g + - name: Install Node.js dependencies for web client + run: | + cd clients/tests/web + npm install + npx playwright install + npx playwright install-deps - name: Install Node.js dependencies for lib run: | cd clients/libs/nodejs npm install + - name: Install Node.js dependencies for web + run: | + cd clients/libs/web + npm install - name: Run Client-Side Tests run: | cd clients/apps/nodejs node test_basic_workflow2.js node test_atomic_swap.js mocha ./test/tb04-simple-lightning-latch.mjs --exit + - name: Run web client Tests + run: | + cd clients/libs/web + npx vitest --browser.name=chromium --browser.headless - name: Tear Down run: | docker-compose -f docker-compose-test.yml down diff --git a/clients/libs/web/vite.config.js b/clients/libs/web/vite.config.js index a1a47266..275a30da 100644 --- a/clients/libs/web/vite.config.js +++ b/clients/libs/web/vite.config.js @@ -1,6 +1,5 @@ import { defineConfig } from 'vite' import { resolve } from 'path' -import { nodePolyfills } from 'vite-plugin-node-polyfills' // https://vitejs.dev/config/ export default defineConfig({