Skip to content

Commit

Permalink
test: use dam to download data
Browse files Browse the repository at this point in the history
Will download newer data if it is stale (hash check) and enables the use
of multiple data stores in the future.
  • Loading branch information
thewtex committed Nov 3, 2023
1 parent 22dd5e8 commit bb991c6
Show file tree
Hide file tree
Showing 5 changed files with 935 additions and 537 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dist-ssr


test/data/
test/data.tar.gz
cypress/screenshots
cypress/videos
micromamba/
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
"lint:fix": "pnpm prettier --write . && pnpm eslint --fix .",
"setup-micromamba": "MICROMAMBA_ROOT_PATH=micromamba CREATE_ENVIRONMENT=true ENVIRONMENT_FILE=environment.yml LOG_LEVEL=info setup-micromamba",
"start-hypha": "pnpm setup-micromamba && ./micromamba/micromamba run -r micromamba -n itk-viewer-test hypha --host=127.0.0.1 --port=37580",
"test": "pnpm test:downloadData && concurrently -n \"hypha,cypress\" --success first -k \"pnpm start-hypha\" \"pnpm cy:component\"",
"test:ci": "pnpm test:downloadData && pnpm cy:component:ci",
"test:downloadData": "node test/downloadData.mjs",
"test": "pnpm test:data:download && concurrently -n \"hypha,cypress\" --success first -k \"pnpm start-hypha\" \"pnpm cy:component\"",
"test:ci": "pnpm test:data:download && pnpm cy:component:ci",
"test:data:pack": "dam pack test/data test/data.tar.gz",
"test:data:download": "dam download -v test/data test/data.tar.gz bafybeidbosxn5wpejig6n5z35jf7ypgxqnib3myp26fqthgu6opchqxruq https://github.com/Kitware/itk-vtk-viewer/releases/download/v14.35.1/itk-vtk-viewer-testing-data.tar.gz",
"cy:watch": "cypress open --component -b chrome",
"cy:component": "cypress run --component",
"cy:component:ci": "cypress run --component --record",
Expand All @@ -25,6 +26,7 @@
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@cypress/mount-utils": "^4.0.0",
"@itk-wasm/dam": "^1.0.1",
"@thewtex/setup-micromamba": "^1.6.0",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
Expand Down
Loading

0 comments on commit bb991c6

Please sign in to comment.