diff --git a/README.md b/README.md index 030a21aa0..8de7e9421 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ The 3D view in Modeling App is just a video stream from our hosted geometry engi [Original demo video](https://drive.google.com/file/d/183_wjqGdzZ8EEZXSqZ3eDcJocYPCyOdC/view?pli=1) -[Original demo slides](https://github.com/KittyCAD/Eng/files/10398178/demo.pdf) +[Original demo slides](https://github.com/user-attachments/files/19010536/demo.pdf) ## Get started @@ -52,18 +52,21 @@ Install a node version manager such as [fnm](https://github.com/Schniz/fnm?tab=r On Windows, it's also recommended to [upgrade your PowerShell version](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5#winget), we're using 7. -Then in the repo run the following to install and use the node version specified in `.nvmrc`. You might need to specify your processor architecture with `--arch arm64` or `--arch x64` if it's not autodetected. +Then in the repo run the following to install and use the node version specified in `.nvmrc`. You might need to specify your processor architecture with `--arch arm64` or `--arch x64` if it's not autodetected. + ``` fnm install --corepack-enabled fnm use ``` Install the NPM dependencies with: + ``` yarn install ``` This project uses a lot of Rust compiled to [WASM](https://webassembly.org/) within it. We have package scripts to run rustup, see `package.json` for reference: + ``` # macOS/Linux yarn install:rust @@ -75,6 +78,7 @@ yarn install:wasm-pack:cargo ``` Then to build the WASM layer, run: + ``` # macOS/Linux yarn build:wasm @@ -135,6 +139,7 @@ To package the app for your platform with electron-builder, run `yarn tronb:pack Which commands from setup are one off vs need to be run every time? The following will need to be run when checking out a new commit and guarantees the build is not stale: + ```bash yarn install yarn build:wasm @@ -185,11 +190,12 @@ Manually test against this [list](https://github.com/KittyCAD/modeling-app/issue ##### Updater-test builds -The other `build-apps` output in the release `build-apps` workflow (triggered by 2.) is `updater-test-{arch}-{platform}`. It's a semi-automated process: for macOS, Windows, and Linux, download the corresponding updater-test artifact file, install the app, run it, expect an updater prompt to a dummy v0.255.255, install it and check that the app comes back at that version. +The other `build-apps` output in the release `build-apps` workflow (triggered by 2.) is `updater-test-{arch}-{platform}`. It's a semi-automated process: for macOS, Windows, and Linux, download the corresponding updater-test artifact file, install the app, run it, expect an updater prompt to a dummy v0.255.255, install it and check that the app comes back at that version. The only difference with these builds is that they point to a different update location on the release bucket, with this dummy v0.255.255 always available. This helps ensuring that the version we release will be able to update to the next one available. If the prompt doesn't show up, start the app in command line to grab the electron-updater logs. This is likely an issue with the current build that needs addressing (or the updater-test location in the storage bucket). + ``` # Windows (PowerShell) & 'C:\Program Files\Zoo Modeling App\Zoo Modeling App.exe' @@ -205,15 +211,14 @@ If the prompt doesn't show up, start the app in command line to grab the electro Head over to https://github.com/KittyCAD/modeling-app/releases/new, pick the newly created tag and type it in the _Release title_ field as well. -Hit _Generate release notes_ as a starting point to discuss the changelog in the issue. Once done, make sure _Set as the latest release_ is checked, and hit _Publish release_. +Hit _Generate release notes_ as a starting point to discuss the changelog in the issue. Once done, make sure _Set as the latest release_ is checked, and hit _Publish release_. -A new `publish-apps-release` will kick in and you should be able to find it [here](https://github.com/KittyCAD/modeling-app/actions?query=event%3Arelease). On success, the files will be uploaded to the public bucket as well as to the GitHub release, and the announcement on Discord will be sent. +A new `publish-apps-release` will kick in and you should be able to find it [here](https://github.com/KittyCAD/modeling-app/actions?query=event%3Arelease). On success, the files will be uploaded to the public bucket as well as to the GitHub release, and the announcement on Discord will be sent. #### 5. Close the issue If everything is well and the release is out to the public, the issue tracking the release shall be closed. - ## Fuzzing the parser Make sure you install cargo fuzz: @@ -251,6 +256,7 @@ snapshottoken= For a portable way to run Playwright you'll need Docker. #### Generic example + After that, open a terminal and run: ```bash @@ -263,7 +269,6 @@ and in another terminal, run: PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project="Google Chrome" ``` - #### Specific example open a terminal and run: @@ -281,7 +286,6 @@ PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project= run a specific test change the test from `test('...` to `test.only('...` (note if you commit this, the tests will instantly fail without running any of the tests) - **Gotcha**: running the docker container with a mismatched image against your `./node_modules/playwright` will cause a failure. Make sure the versions are matched and up to date. run headed @@ -375,6 +379,7 @@ Which will run our suite of [Vitest unit](https://vitest.dev/) and [React Testin - `just` #### Setting KITTYCAD_API_TOKEN + Use the production zoo.dev token, set this environment variable before running the tests #### Installing cargonextest @@ -386,6 +391,7 @@ cargo install cargo-nextest ``` #### just + install [`just`](https://github.com/casey/just?tab=readme-ov-file#pre-built-binaries) #### Running the tests @@ -419,6 +425,7 @@ KITTYCAD_API_TOKEN=XXX cargo run nextest ### Mapping CI CD jobs to local commands When you see the CI CD fail on jobs you may wonder three things + - Do I have a bug in my code? - Is the test flaky? - Is there a bug in `main`? @@ -437,7 +444,6 @@ yarn test-setup > Gotcha, are packages up to date and is the wasm built? - ``` yarn tsc yarn fmt-check