mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-05 16:46:43 +02:00
Fix applitools cypress
This commit is contained in:
20
.github/workflows/e2e-applitools.yml
vendored
20
.github/workflows/e2e-applitools.yml
vendored
@@ -38,15 +38,8 @@ jobs:
|
|||||||
- name: Setup Node.js ${{ matrix.node-version }}
|
- name: Setup Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
cache: pnpm
|
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
- name: Install Packages
|
|
||||||
run: |
|
|
||||||
pnpm install --frozen-lockfile
|
|
||||||
env:
|
|
||||||
CYPRESS_CACHE_FOLDER: .cache/Cypress
|
|
||||||
|
|
||||||
- if: ${{ env.USE_APPLI }}
|
- if: ${{ env.USE_APPLI }}
|
||||||
name: Notify applitools of new batch
|
name: Notify applitools of new batch
|
||||||
# Copied from docs https://applitools.com/docs/topics/integrations/github-integration-ci-setup.html
|
# Copied from docs https://applitools.com/docs/topics/integrations/github-integration-ci-setup.html
|
||||||
@@ -54,19 +47,22 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
# e.g. mermaid-js/mermaid/my-branch
|
# e.g. mermaid-js/mermaid/my-branch
|
||||||
APPLITOOLS_BRANCH: ${{ github.repository }}/${{ github.ref_name }}
|
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_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
|
||||||
APPLITOOLS_SERVER_URL: 'https://eyesapi.applitools.com'
|
APPLITOOLS_SERVER_URL: 'https://eyesapi.applitools.com'
|
||||||
|
|
||||||
- name: Run E2E Tests
|
- name: Cypress run
|
||||||
run: pnpm run e2e
|
uses: cypress-io/github-action@v4
|
||||||
|
id: cypress
|
||||||
|
with:
|
||||||
|
start: pnpm run dev
|
||||||
|
wait-on: 'http://localhost:9000'
|
||||||
env:
|
env:
|
||||||
CYPRESS_CACHE_FOLDER: .cache/Cypress
|
|
||||||
# Mermaid applitools.config.js uses this to pick batch name.
|
# Mermaid applitools.config.js uses this to pick batch name.
|
||||||
APPLI_BRANCH: ${{ github.ref_name }}
|
APPLI_BRANCH: ${{ github.ref_name }}
|
||||||
APPLITOOLS_BATCH_ID: ${{ github.sha }}
|
APPLITOOLS_BATCH_ID: ${{ github.sha }}
|
||||||
# e.g. mermaid-js/mermaid/my-branch
|
# e.g. mermaid-js/mermaid/my-branch
|
||||||
APPLITOOLS_BRANCH: ${{ github.repository }}/${{ github.ref_name }}
|
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_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
|
||||||
APPLITOOLS_SERVER_URL: 'https://eyesapi.applitools.com'
|
APPLITOOLS_SERVER_URL: 'https://eyesapi.applitools.com'
|
||||||
|
@@ -11,6 +11,7 @@ const visualize = process.argv.includes('--visualize');
|
|||||||
const watch = process.argv.includes('--watch');
|
const watch = process.argv.includes('--watch');
|
||||||
const mermaidOnly = process.argv.includes('--mermaid');
|
const mermaidOnly = process.argv.includes('--mermaid');
|
||||||
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
||||||
|
const sourcemap = false;
|
||||||
|
|
||||||
type OutputOptions = Exclude<
|
type OutputOptions = Exclude<
|
||||||
Exclude<InlineConfig['build'], undefined>['rollupOptions'],
|
Exclude<InlineConfig['build'], undefined>['rollupOptions'],
|
||||||
@@ -60,7 +61,7 @@ export const getBuildConfig = ({ minify, core, watch, entryName }: BuildOptions)
|
|||||||
{
|
{
|
||||||
name,
|
name,
|
||||||
format: 'esm',
|
format: 'esm',
|
||||||
sourcemap: true,
|
sourcemap,
|
||||||
entryFileNames: `${name}.esm${minify ? '.min' : ''}.mjs`,
|
entryFileNames: `${name}.esm${minify ? '.min' : ''}.mjs`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@@ -79,7 +80,7 @@ export const getBuildConfig = ({ minify, core, watch, entryName }: BuildOptions)
|
|||||||
{
|
{
|
||||||
name,
|
name,
|
||||||
format: 'esm',
|
format: 'esm',
|
||||||
sourcemap: true,
|
sourcemap,
|
||||||
entryFileNames: `${name}.core.mjs`,
|
entryFileNames: `${name}.core.mjs`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user