Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces the concept of test projects to AL-Go for GitHub — a new project type that separates test execution from compilation. A test project does not build any apps; instead, it depends on one or more regular projects, installs the apps they produce (including test apps), and runs tests against them. This enables re-running tests without a full rebuild.
Changes:
- New
testProjectsetting for project-level.AL-Go/settings.json, with schema validation, default value, and documentation - Dependency resolution and build order logic to treat test projects as dependents of their upstream projects
- Pipeline changes to correctly handle running a test project with no local app/test folders
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
Actions/AL-Go-Helper.ps1 |
Adds testProject handling in AnalyzeRepo (validates no buildable code, sets test runner flags) and AnalyzeProjectDependencies (injects build-order dependencies via synthetic markers) |
Actions/RunPipeline/RunPipeline.ps1 |
Skips the "repository is empty" early exit for test projects |
Actions/.Modules/ReadSettings.psm1 |
Adds testProject with an empty-array default to the settings defaults |
Actions/.Modules/settings.schema.json |
Adds testProject as an array-of-strings property to the JSON schema |
Scenarios/settings.md |
Documents the new testProject setting |
RELEASENOTES.md |
Describes the test projects feature and its usage |
Tests/DetermineProjectsToBuild.Test.ps1 |
Adds six new test scenarios covering dependency resolution, validation errors, transitive deps, and multi-upstream cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| "templateBranch" = "" | ||
| "appDependencyProbingPaths" = @() | ||
| "useProjectDependencies" = $false | ||
| "testProject" = @() |
There was a problem hiding this comment.
Since this is an array, it feels like this should be plural no? So testProjects
There was a problem hiding this comment.
Maybe? The thought behind it is that the current project is a test project (singular) if this setting is set. testProjects might not be a good name since that would indicate it depends on several test projects? Maybe testProjectDependencies instead?
Actions/AL-Go-Helper.ps1
Outdated
| $settings.installTestRunner = $true | ||
| $settings.installTestFramework = $true | ||
| $settings.installTestLibraries = $true |
There was a problem hiding this comment.
Can we not just take these from the repos settings file? You may not need all these 🤷♂️
RELEASENOTES.md
Outdated
|
|
||
| - Resolve the dependency so the test project always builds after its target project(s). | ||
| - Install the Test Runner, Test Framework, and Test Libraries into the container. | ||
| - Run all tests from the installed test apps (`runTestsInAllInstalledTestApps`). |
There was a problem hiding this comment.
| - Run all tests from the installed test apps (`runTestsInAllInstalledTestApps`). | |
| - Run all tests from the installed test apps. |
❔What, Why & How
This new feature brings the concept of test projects to AL-Go for GitHub. The purpose of this is to allow the user to split building and testing into separate projects. This can be especially useful if some tests are unstable and might require a re-run to succeed. In such scenarios, it's nice not to have to wait for compilation again.
A test project is a special type of project that depends on one or more regular projects. It will download and install artifacts from those dependent projects and run all test apps it finds. It allows any customization or settings used in regular projects, such as build modes or conditional settings. The only limitation is test projects are not allowed to build apps.
Related to issue: #
✅ Checklist