Skip to content

Commit 4fdc99f

Browse files
committed
feat(codespaces): support for GitHub Codespaces
1 parent 4230348 commit 4fdc99f

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
8181
13+
],
14+
"portsAttributes": {
15+
"6080": {
16+
"label": "Desktop"
17+
},
18+
"8080": {
19+
"label": "Serenity Reports"
20+
},
21+
"8181": {
22+
"label": "Playwright Reports"
23+
}
24+
},
25+
"postCreateCommand": {
26+
"Install": "npm ci",
27+
"Welcome": "sudo cp .devcontainer/first-run-notice.txt /workspaces/.codespaces/shared/first-run-notice.txt"
28+
},
29+
"waitFor": "postCreateCommand",
30+
"postAttachCommand": {
31+
"Serenity/JS Test Run": "npm test",
32+
"Serenity Reports Preview": "npx http-server -p 8080 target/site/serenity/",
33+
"Playwright Reports Preview": "npx http-server -p 8181 playwright-report"
34+
},
35+
36+
"customizations": {
37+
"vscode": {
38+
"extensions": [
39+
"dbaeumer.vscode-eslint",
40+
"editorconfig.editorconfig",
41+
"eamodio.gitlens",
42+
"ms-playwright.playwright",
43+
"stateful.runme"
44+
],
45+
"settings": {
46+
"workbench.editorAssociations": {
47+
"*.md": "runme"
48+
}
49+
}
50+
}
51+
}
52+
}

.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/

0 commit comments

Comments
 (0)