Skip to content

Conversation

@freddydk
Copy link
Contributor

@freddydk freddydk commented Mar 26, 2025

This PR adds support for using an online environment for running tests when building apps. If you are building a PTE with dependencies to 3rd party appsource apps, you might not have access to runtime packages for these AppSource apps and hence, you might not be able to run tests for your PTE.

Using an online environment for CI/CD or potentially a scheduled Test Current workflow, allows you to run tests for your PTE.

New Workflow specific settings

  • buildEnvironmentName - should be the Business Central environment name (from the Admin Center) for the environment you want to use if you want to run tests using online environments. Note that you also need to create a buildAuthContext secret, which gives access to this environment.

Use online environment during build for running tests

By creating a buildAuthContext secret and setting the buildEnvironmentName for a specific branch and a specific workflow, will cause AL-Go for GitHub to use this environment for running tests. An example of how to define these settings could be:

  "useCompilerFolder": true,
  "doNotPublishApps": true,
  "conditionalSettings": [
    {
      "workflows": [ "CICD" ],
      "branches": [ "main" ],
      "settings": {
        "doNotPublishApps": false,
        "buildEnvironmentName": "cicd",
        "buildAuthContextSecretName": "cicdAuthContext",
        "workflowConcurrency": [ "group: ${{ github.workflow }}-${{ github.ref }}", "cancel-in-progress: false" ]
      }
    }
  ]

@freddydk
Copy link
Contributor Author

This will be done in a different way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants