Skip to content

Commit

Permalink
Merge pull request #1109 from thewtex/browser-flake
Browse files Browse the repository at this point in the history
browser flake
  • Loading branch information
thewtex authored Apr 13, 2024
2 parents d792345 + 0b38956 commit 75f7ae6
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
install: false
start: pnpm start
config: video=true
wait-on: 'http://localhost:5173'
wait-on: 'http://localhost:5180'
wait-on-timeout: 360

- uses: actions/upload-artifact@v4
Expand All @@ -151,7 +151,7 @@ jobs:
#install: false
#config: video=true
#start: pnpm start
#wait-on: 'http://localhost:5173'
#wait-on: 'http://localhost:5180'
#wait-on-timeout: 360

- uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@shoelace-style/shoelace": "^2.12.0",
"start-server-and-test": "^2.0.3",
"ava": "^6.1.0",
"cypress": "^13.6.3"
"cypress": "^13.7.3"
}
},
"commitlint": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/typescript/itk-wasm/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default defineConfig({
projectId: '3ow3bt',
e2e: {
defaultCommandTimeout: 20000,
baseUrl: "http://localhost:5173",
baseUrl: "http://localhost:5180",
setupNodeEvents(on, config) {
// implement node event listeners here
},
Expand Down
4 changes: 2 additions & 2 deletions packages/core/typescript/itk-wasm/cypress/e2e/common.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const demoServer = 'http://localhost:5173'
export const demoServer = 'http://localhost:5180'

export const pipelineBaseUrl = new URL('/pipelines', demoServer)
export const pipelineWorkerUrl = new URL('/itk-wasm-pipeline.worker.js', demoServer)
Expand Down Expand Up @@ -32,4 +32,4 @@ export async function readIwm (baseUrl: string) {
mesh.pointData = null
mesh.cellData = null
return mesh
}
}
12 changes: 6 additions & 6 deletions packages/core/typescript/itk-wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
"test:runTestPipelines": "node src/itk-wasm-cli.js -b wasi-build -s ./test/pipelines run -r wasmtime stdout-stderr-pipeline/stdout-stderr-test.wasi.wasm",
"test:bindgenTestPipelines:typescript": "node src/itk-wasm-cli.js -b emscripten-build -s ./test/pipelines/ bindgen --package-version 1.0.0 --package-name test-pipelines --package-description \"Exercise interface types for bindgen\"",
"test:bindgenTestPipelines:python": "node src/itk-wasm-cli.js -b wasi-build -s ./test/pipelines/ bindgen --interface python --package-version 1.0.0 --package-name test-pipelines --package-description \"Exercise interface types for bindgen\"",
"test:browser:debug": "start-server-and-test start http-get://localhost:5173 cypress:open",
"test:cypress": "start-server-and-test start http-get://localhost:5173 cypress:run",
"test:browser:chrome": "start-server-and-test start http-get://localhost:5173 cypress:runChrome",
"test:browser:firefox:ci": "start-server-and-test start http-get://localhost:5173 cypress:runFirefox:ci",
"test:browser:firefox": "start-server-and-test start http-get://localhost:5173 cypress:runFirefox",
"test:browser:debug": "start-server-and-test start http-get://localhost:5180 cypress:open",
"test:cypress": "start-server-and-test start http-get://localhost:5180 cypress:run",
"test:browser:chrome": "start-server-and-test start http-get://localhost:5180 cypress:runChrome",
"test:browser:firefox:ci": "start-server-and-test start http-get://localhost:5180 cypress:runFirefox:ci",
"test:browser:firefox": "start-server-and-test start http-get://localhost:5180 cypress:runFirefox",
"prepublishOnly": "pnpm build:tsc && node ./src/update-versions.cjs && pnpm build:bundle && pnpm build:minBundle && pnpm build:workerBundle && pnpm build:workerMinBundle",
"clean": "git clean -fdx"
},
Expand All @@ -77,7 +77,7 @@
"devDependencies": {
"@types/node": "^20.10.3",
"ava": "^5.3.1",
"cypress": "^13.6.0",
"cypress": "^13.7.3",
"esbuild": "^0.19.8",
"prettier": "^3.2.5",
"prettier-config-standard": "^7.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { defineConfig } from 'vite'
import { viteStaticCopy } from 'vite-plugin-static-copy'
import path from 'path'

const base = process.env.VITE_BASE_URL || '/'

export default defineConfig({
root: path.join('test', 'browser', 'demo-app'),
base,
server: {
port: 5180
},
build: {
outDir: '../../../demo-app',
emptyOutDir: true,
},
worker: {
format: 'es'
},
optimizeDeps: {
exclude: ['itk-wasm', '@itk-wasm/image-io', '@itk-wasm/mesh-io', '@thewtex/zstddec']
},
plugins: [
// put lazy loaded JavaScript and Wasm bundles in dist directory
viteStaticCopy({
targets: [
{ src: '../../../dist/pipelines/*', dest: 'pipelines' },
{ src: '../../../node_modules/@itk-wasm/image-io/dist/pipelines/*.{js,wasm,wasm.zst}', dest: 'pipelines' },
{ src: '../../../node_modules/@itk-wasm/mesh-io/dist/pipelines/*.{js,wasm,wasm.zst}', dest: 'pipelines' },
],
})
],
})
34 changes: 17 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 75f7ae6

Please sign in to comment.