As a developer i want to create a new environment when a new PR is opened so i can test that PR’s Code in isolation without having to merge the code to dev

I’d like to create new envs via trellis when a PR is created.

Acceptance Criterias

  • should use copy of staging db
  • should use copy of envs from staging
  • environment should use PR ID
  • should use a domain with PR ID
  • should be compatible with github actions.
  • should be created when a new PR is opened
  • should get changes from newer commits in PR
  • should be deleted when PR is closed
  • should be deleted when PR branch is deleted

It doesn’t cover all of your use cases, but take a look at this, particularly the examples, which includes a dry-run action.

Trellis’s own integration test makes the brilliant move of provisioning the VM it’s running on (cheers, @swalkinshaw), which might help too: