Add dev container support - #4882
Conversation
ba6a0cf to
e348680
Compare
| "test:headed": "bddgen && playwright test --headed", | ||
| "test:report": "playwright show-report", | ||
| "test:ui": "bddgen && playwright test --ui" | ||
| "test:ui": "bddgen && playwright test --ui-port 6080" |
There was a problem hiding this comment.
Did you not need --ui-host in the end?
There was a problem hiding this comment.
How strange, I'm now even more confused as to why I needed it
There was a problem hiding this comment.
It would make sense that you would need it if 0.0.0.0 was not the default 🤔 and it's certainly specified in the docs
There was a problem hiding this comment.
Pull request overview
Adds a devenv-based dev container for running Grid and its end-to-end tests.
Changes:
- Adds shared dev-container configuration and documentation.
- Pins tooling and exposes Playwright UI on port 6080.
- Broadens Playwright CI pull-request triggers.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.devcontainer/.gitignore |
Excludes personal configuration. |
.devcontainer/README.md |
Documents dev-container usage. |
.devcontainer/devenv.yaml |
Defines dependencies, ports, and setup. |
.devcontainer/shared/devcontainer.json |
Provides generated shared configuration. |
.github/workflows/playwright.yml |
Runs for pull requests to any branch. |
.tool-versions |
Adds devenv and sbt tooling. |
e2e-tests/package.json |
Assigns Playwright UI port 6080. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
82dbfaa to
9f79df1
Compare
92980cb to
0afe7ae
Compare
davidfurey
left a comment
There was a problem hiding this comment.
Approved with non-blocking feedback.
Apart from the missing npm ci that we discussed in person.
d899999 👍 |
bf31cde to
6fe7e33
Compare
expose ports, add modules, and build containers on startup
…the devenv feature
|
Seen on auth, usage, image-loader, metadata-editor, thrall, leases, cropper, collections, media-api, kahuna (merged by @jonathonherbert 10 minutes and 54 seconds ago) Please check your changes! |
What does this change?
A first pass for devcontainer support for this project, using devenv.
The devcontainer includes all of the dependencies necessary to run the Grid.
I've verified support for running the end-to-end tests in #4826.
Running the application with
./dev/script/startis untested at the moment, as I'd like to encapsulate a run command with our testcontainers setup for devcontainers, if possible, to ensure all runner options share the same approach.How should a reviewer test this change?
cd ./e2e-tests && npm run test. You should see them pass.cd ./e2e-tests && npm run test:ui. If you're running in VS Code, the IDE should offer to open a web page which talks directly to the Playwright server running in the devcontainer.All tested locally on d5700ff.
How can success be measured?
We have a secure way to run end-to-end tests in a fully sandboxed developer environment.
Who should look at this?
Tested? Documented?
on the Guardian's TEST environmentN/A