From 642397b36c7d13c5ef747dae89e1bdec03ea70cc Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sun, 23 Apr 2023 15:59:27 +0530 Subject: [PATCH] Fix applitools cypress --- .github/workflows/e2e-applitools.yml | 20 ++++++++------------ .vite/build.ts | 5 +++-- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/e2e-applitools.yml b/.github/workflows/e2e-applitools.yml index da6dbdb1f..92f2f80b1 100644 --- a/.github/workflows/e2e-applitools.yml +++ b/.github/workflows/e2e-applitools.yml @@ -38,15 +38,8 @@ jobs: - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: - cache: pnpm node-version: ${{ matrix.node-version }} - - name: Install Packages - run: | - pnpm install --frozen-lockfile - env: - CYPRESS_CACHE_FOLDER: .cache/Cypress - - if: ${{ env.USE_APPLI }} name: Notify applitools of new batch # Copied from docs https://applitools.com/docs/topics/integrations/github-integration-ci-setup.html @@ -54,19 +47,22 @@ jobs: env: # e.g. mermaid-js/mermaid/my-branch APPLITOOLS_BRANCH: ${{ github.repository }}/${{ github.ref_name }} - APPLITOOLS_PARENT_BRANCH: ${{ github.inputs.parent_branch }} + APPLITOOLS_PARENT_BRANCH: ${{ github.event.inputs.parent_branch }} APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }} APPLITOOLS_SERVER_URL: 'https://eyesapi.applitools.com' - - name: Run E2E Tests - run: pnpm run e2e + - name: Cypress run + uses: cypress-io/github-action@v4 + id: cypress + with: + start: pnpm run dev + wait-on: 'http://localhost:9000' env: - CYPRESS_CACHE_FOLDER: .cache/Cypress # Mermaid applitools.config.js uses this to pick batch name. APPLI_BRANCH: ${{ github.ref_name }} APPLITOOLS_BATCH_ID: ${{ github.sha }} # e.g. mermaid-js/mermaid/my-branch APPLITOOLS_BRANCH: ${{ github.repository }}/${{ github.ref_name }} - APPLITOOLS_PARENT_BRANCH: ${{ github.inputs.parent_branch }} + APPLITOOLS_PARENT_BRANCH: ${{ github.event.inputs.parent_branch }} APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }} APPLITOOLS_SERVER_URL: 'https://eyesapi.applitools.com' diff --git a/.vite/build.ts b/.vite/build.ts index 183158288..56c3a72f3 100644 --- a/.vite/build.ts +++ b/.vite/build.ts @@ -11,6 +11,7 @@ const visualize = process.argv.includes('--visualize'); const watch = process.argv.includes('--watch'); const mermaidOnly = process.argv.includes('--mermaid'); const __dirname = fileURLToPath(new URL('.', import.meta.url)); +const sourcemap = false; type OutputOptions = Exclude< Exclude['rollupOptions'], @@ -60,7 +61,7 @@ export const getBuildConfig = ({ minify, core, watch, entryName }: BuildOptions) { name, format: 'esm', - sourcemap: true, + sourcemap, entryFileNames: `${name}.esm${minify ? '.min' : ''}.mjs`, }, ]; @@ -79,7 +80,7 @@ export const getBuildConfig = ({ minify, core, watch, entryName }: BuildOptions) { name, format: 'esm', - sourcemap: true, + sourcemap, entryFileNames: `${name}.core.mjs`, }, ];