Skip to content

Commit fc5d50d

Browse files
committed
feat(codespaces): support for GitHub Codespaces
1 parent da4af70 commit fc5d50d

File tree

3 files changed

+56
-1
lines changed

3 files changed

+56
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"image": "ghcr.io/serenity-js/playwright:v1.56.1-noble",
3+
4+
"features": {
5+
"ghcr.io/devcontainers/features/desktop-lite:1": {},
6+
"ghcr.io/devcontainers/features/github-cli:1": {}
7+
},
8+
9+
"forwardPorts": [
10+
6080,
11+
8080
12+
],
13+
"portsAttributes": {
14+
"6080": {
15+
"label": "Desktop"
16+
},
17+
"8080": {
18+
"label": "Serenity Reports"
19+
}
20+
},
21+
"postCreateCommand": {
22+
"Install": "npm ci",
23+
"Welcome": "sudo cp .devcontainer/first-run-notice.txt /workspaces/.codespaces/shared/first-run-notice.txt"
24+
},
25+
"waitFor": "postCreateCommand",
26+
"postAttachCommand": {
27+
"Serenity/JS Test Run": "npm test",
28+
"Serenity Reports Preview": "npx http-server -p 8080 target/site/serenity/"
29+
},
30+
31+
"customizations": {
32+
"vscode": {
33+
"extensions": [
34+
"dbaeumer.vscode-eslint",
35+
"editorconfig.editorconfig",
36+
"eamodio.gitlens",
37+
"stateful.runme"
38+
],
39+
"settings": {
40+
"workbench.editorAssociations": {
41+
"*.md": "runme"
42+
}
43+
}
44+
}
45+
}
46+
}

.devcontainer/first-run-notice.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
👋 Welcome to your Serenity/JS GitHub Codespace!
2+
3+
🛠️ Your environment is fully configured and ready for you to explore the Serenity/JS framework.
4+
5+
🚀 Once the setup process in the terminal completes:
6+
- Open the port labeled "Serenity Reports" to view the test execution reports.
7+
- Open the port labeled "Playwright Report" to explore detailed Playwright test results.
8+
9+
ℹ️ Learn more at 👉 https://serenity-js.org/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
"homepage": "https://serenity-js.org",
3333
"engines": {
34-
"node": "^18.12 || ^20 || ^22 || ^24.0.0"
34+
"node": "^20 || ^22 || ^24"
3535
},
3636
"devDependencies": {
3737
"@cucumber/cucumber": "^11.3.0",

0 commit comments

Comments
 (0)