Repository navigation
Conversation
|
Added a |
6c7e539 to
11a1e16
Compare
| # apt-get install shellcheck and shfmt while the tombi snap downloads; the | ||
| # versions are older than the snaps but the Makefile accepts them. | ||
| sudo apt-get update | ||
| sudo apt-get install --yes --no-install-recommends \ |
There was a problem hiding this comment.
This is not necessarily a full set of what we need, but we run make setup in the project to get the rest. This will, however, ensure that we have most of the requirements, which makes a project refresh quicker.
There was a problem hiding this comment.
🟡 Changes recommended
The shared setup hook may fail on Jammy by installing the unsupported 7zip package, while the development setup can run root tests against an unsynchronized virtual environment because UV_PROJECT_ENVIRONMENT is not preserved.
2 open issues
What changed in this PR
Adds Workshop-based development and test environments for Ubuntu 26.04, 24.04, and 22.04, integrating repository setup, tooling, testing, and QA workflows.
Changes:
- Adds dev, Noble, and Jammy Workshop definitions with shared SDK and virtual-environment configuration.
- Adds hooks for system dependencies, project tooling, and uv-based project setup.
- Updates type-checking and adds Workshop coverage to the QA workflow.
- Ignores Workshop's generated lockfile.
| File | Description |
|---|---|
| common.mk | Updates type-checking to use the configured Workshop or uv project environment. |
| .workshop/noble.yaml | Defines the Ubuntu 24.04 test Workshop environment and its test actions. |
| .workshop/jammy.yaml | Defines the Ubuntu 22.04 test Workshop environment and its test actions. |
| .workshop/dev.yaml | Defines the Ubuntu 26.04 development Workshop with setup, testing, linting, formatting, and root-test actions. |
| .workshop/craft-parts/meta/sdk.yaml | Declares the shared in-project Workshop SDK and virtual-environment mount. |
| .workshop/craft-parts/hooks/setup-project | Installs project development tools and synchronizes the project's dependency environments. |
| .workshop/craft-parts/hooks/setup-base | Installs system-level development and test dependencies and configures the Workshop environment. |
| .gitignore | Adds Workshop's generated lockfile to the ignored files. |
| .github/workflows/qa.yaml | Adds CI jobs that launch the Workshops and run tests, linting, and related checks across Ubuntu versions and architectures. |
Review effort: Lite
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
There was a problem hiding this comment.
The changes to this file are all-natural, no AI involved.
632722d to
b10743c
Compare
|
Linting fixed in #1820 |
Add .workshop definitions for container-based development environments: a dev workshop on Ubuntu 26.04 plus noble and jammy workshops for running tests on those Ubuntu versions. The shared in-project craft-parts SDK installs build/test system packages (setup-base) and runs the project's own make setup in /project (setup-project). Tools are sourced arch-independently: tombi as a classic snap, shellcheck/shfmt via apt, actionlint built with go install (GOBIN=/usr/local/bin), and ruff/ty/codespell/ pre-commit as uv tools since non-classic snaps cannot see /project. Verified: make test-fast passes on all three workshops (5433 tests), lint/format actions run in dev, actionlint v1.7.12 present in all.
Run the lint and test-fast workshop actions in a matrix over the ubuntu-26.04 and ubuntu-26.04-arm GitHub runners and the dev, noble, and jammy workshop definitions, using the canonical/launch-workshop action. Lint runs only on the dev workshop since noble and jammy are test-only environments. The uv package cache and go module cache are persisted across runs via the action's cache input.
Replace the go install of actionlint with the actionlint SDK from the SDK Store, which provides prebuilt binaries for all supported bases. The go SDK stays: it is needed for testing the go plugin.
The go-installed binary is long gone; nothing creates /usr/local/bin/actionlint anymore.
prek from the SDK Store replaces the uv tool install of pre-commit; the Makefile already falls back to prek-compatible invocation.
The SDK Store tombi replaces the classic snap install, removing the snap change tracking and wait loop from setup-base.
The lint action's uv tool invocations refresh .venv with only the lint dependency groups, dropping the docs group packages such as vale. The docs Makefile then skips its own venv bootstrap because .venv already exists, and vale-install fails with a missing vale binary.
Add lint-code and lint-docs as dev workshop actions and run lint-code in CI, since the full lint target includes docs linting which needs the docs environment set up.
All workshops on one checkout share /project, so a venv inside it gets clobbered by each workshop's make setup (each with its own Python version and distro dependency group). Set UV_PROJECT_ENVIRONMENT to /opt/venv in the setup-project hook and all actions, so every workshop syncs and runs against its own venv via the uv:venv mount slot.
Move the per-workshop venv override into setup-base as a profile.d script, matching how the SDKs set up their environment. The per-action env prefixes are no longer needed.
The hardcoded --python .venv breaks when the project venv lives elsewhere (e.g. a Workshop setting UV_PROJECT_ENVIRONMENT to a per-workshop path). Fall back to .venv when the variable is unset.
Co-authored-by: JJ Coldiron <[email protected]> Signed-off-by: Alex Lowe <[email protected]>
993ff11 to
a8fa396
Compare


What changed
Adds Workshop definitions under
.workshop/for container-based development environments on this repository:All three share one in-project SDK (
.workshop/craft-parts/) that:go install(GOBIN=/usr/local/bin) for architecture independence.make setup, which uv-syncs all dependency groups including the distro-specific python-apt group.Also adds
.workshop.lockto.gitignore(Workshop's internal project tracking file).Rationale for tool sources
Non-classic snaps cannot see the
/projectmount (snap confinement), so tools that need project access (ruff, ty, codespell, pre-commit) are uv tools. Only the classic tombi snap is used. shellcheck/shfmt come from apt and actionlint is built from source withgo installso the hooks work on any architecture, including riscv64 which has no actionlint release tarball.Verification
make test-fastpasses on all three workshops (5433 tests: noble/py3.12, jammy/py3.10, dev/26.04).lintandformatactions pass in dev.actionlint v1.7.12present in all three workshops.CRAFT-5379