Skip to content

Run the examples against Locally in GitHub Actions - #6

Open
tombuildsstuff wants to merge 5 commits into
mainfrom
f/examples-ci
Open

tombuildsstuff wants to merge 5 commits into
mainfrom
f/examples-ci

Conversation

@tombuildsstuff

Copy link
Copy Markdown
Member

Adds a GitHub Actions workflow that runs the examples against Locally, using locallybuild/setup-locally.

  • Pull Requests run the examples whose directories they change. A change to the CI itself (.github/workflows/examples.yml or .github/scripts/) runs every example, so this PR runs all of them.
  • Running the workflow manually (workflow_dispatch) runs every example: 320 in 35 jobs.

Each job runs a batch of up to 10 examples of one kind (ARM, Bicep, Terraform, OpenTofu, Go, .NET or Pulumi). It sets up that toolchain and starts Locally once, with the plugins listed in those examples' READMEs. Each example runs as its README describes; Terraform, OpenTofu and Pulumi also destroy. A job runs all of its examples and then lists every one that failed.

Not covered: the Service Bus sender/processor examples (they loop forever), and the Azure CLI and PowerShell examples (they're only snippets in READMEs).

Every action is pinned to a commit SHA except locallybuild/setup-locally, and Dependabot now proposes updates for those pins.

Signs in using the LOCALLY_TEAM_UUID repository variable over OIDC.

🤖 Generated with Claude Code

tombuildsstuff and others added 5 commits October 16, 2026 14:56
Pull Requests run the examples they change (or every example, when the CI
itself changes), and running the workflow manually runs every example.
Examples are batched by kind, so each job sets up one toolchain and starts
Locally once with the plugins its examples need.

Also adds the GitHub Actions ecosystem to Dependabot, to keep the pinned
action SHAs up to date.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The custom cloud.Configuration didn't set ActiveDirectoryAuthorityHost, so
EnvironmentCredential failed and DefaultAzureCredential only worked when it
could fall back to an Azure CLI login - which isn't the case in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Terraform, OpenTofu and Pulumi examples now destroy even when the apply
fails, so a partially-created Resource Group no longer breaks every later
example in the batch. The runner's resolver is also pointed at Locally's
DNS, so data planes such as Key Vault can be reached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Locally's DNS only answers for the names it serves, so a made-up Key Vault
name never resolves - check control-plane.locally instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
setup-locally configures and validates DNS for *.locally itself
(locallybuild/setup-locally#2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant