This guide explains how to work with this repository, including how to set up your development environment and run all available tasks.
This project uses mise (formerly rtx) to manage tool versions and tasks. Make sure you have mise installed before proceeding.
The project requires:
All tools are automatically installed by mise when you run tasks.
To set up the project for the first time, run:
mise run setup
This will:
All tasks are run using mise run <task-name>. Here’s a comprehensive guide to all available tasks:
setupComplete project setup including dependencies and git hooks.
mise run setup
husky-setupSet up Husky git hooks (automatically runs as part of setup).
mise run husky-setup
npm-installInstall npm dependencies. This task is cached and will only re-run when package.json or package-lock.json changes.
mise run npm-install
elm-installInstall Elm dependencies. This task is cached and will only re-run when elm.json or source files change.
mise run elm-install
elm-test-installInstall Elm test dependencies. This task is cached and will only re-run when elm.json or test files change.
mise run elm-test-install
These tasks ensure dependencies are installed without running builds or tests. Useful for CI/CD or when you want to restore dependencies.
restoreRestore project dependencies (npm and Elm).
mise run restore
restore-test-dependenciesRestore test dependencies (Elm test packages).
mise run restore-test-dependencies
restore-allRestore all project and test dependencies.
mise run restore-all
buildBuild both Elm and Morphir. This is the main build task.
mise run build
elm-buildBuild and validate Elm code.
mise run elm-build
morphir-buildGenerate Morphir IR from Elm sources.
mise run morphir-build
formatFormat all Elm code in src/ and tests/ directories using elm-format.
mise run format
format-checkCheck if Elm code is properly formatted without making changes. This is useful for CI/CD.
mise run format-check
testRun all tests using elm-test-rs.
mise run test
lintRun all linting tasks (currently includes workflow linting).
mise run lint
lint-workflowsLint GitHub Actions workflow YAML files using actionlint.
mise run lint-workflows
verifyRun all code quality checks: lint, format-check, and test. This is the comprehensive verification task.
mise run verify
This task is also run automatically by the pre-push git hook to ensure code quality before pushing.
cleanClean all build outputs (npm, Elm, and Morphir).
mise run clean
clean-npmClean npm build outputs (node_modules/).
mise run clean-npm
clean-elmClean Elm build outputs (elm-stuff/).
mise run clean-elm
clean-morphirClean Morphir build outputs (IR JSON files).
mise run clean-morphir
trigger-releaseTrigger a release by creating and pushing a version tag. This will automatically trigger the GitHub Actions release workflow.
mise run trigger-release v1.0.0
The version must follow semantic versioning format (e.g., v1.0.0, v2.3.4, v1.0.0-beta.1).
Requirements:
What it does:
generate-release-notesGenerate release notes for a given version tag by comparing it to the previous tag.
mise run generate-release-notes v1.0.0 [repository-url]
determine-release-tagDetermine release tag from event type (used internally by the release workflow).
mise run determine-release-tag <event-name> [version-input] [github-ref]
create-morphir-archiveCreate a gzipped tar archive of Morphir IR artifacts.
mise run create-morphir-archive v1.0.0
train-build-releaseRun the train-build-release tool.
mise run train-build-release
mise run setup
Make your changes to the code
mise run format
mise run test
mise run verify
verify automatically)Run the verification task to ensure everything is correct:
mise run verify
This will:
If you need to start fresh or free up disk space:
mise run clean
Then restore dependencies:
mise run restore-all
To create a new release:
git status # Should show no uncommitted changes
mise run verify
mise run trigger-release v1.0.0
Replace v1.0.0 with your desired version number (must follow semantic versioning).
Note: The release workflow is triggered automatically when you push a tag matching the pattern v*.*.*. You can also trigger it manually from the GitHub Actions UI by using the “Run workflow” button and providing a version.
This project uses Husky to manage git hooks:
mise run verify before pushing to ensure code qualityThe hooks are set up automatically when you run mise run setup.
Many tasks use mise’s caching mechanism to avoid unnecessary work:
sources and outputs defined will only re-run when source files changenpm-install only runs when package.json or package-lock.json changesTo see all available tasks and their descriptions:
mise tasks ls
To see detailed information about a specific task:
mise tasks info <task-name>
To see the dependency graph for a task:
mise tasks deps <task-name>