Skip to content

Commit 44efcd2

Browse files
committed
test: ✅ update test matrix
1 parent 9b326c4 commit 44efcd2

4 files changed

Lines changed: 36 additions & 24 deletions

File tree

.github/agents.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ This project follows [Conventional Commits](https://www.conventionalcommits.org/
199199
4. Create `test/<feature-name>/test.sh`
200200
5. Update main `README.md`
201201
6. Update this `agents.md` file
202+
7. **IMPORTANT: Update `.github/workflows/test.yml`** - Add the new feature to the test matrix with appropriate base image
203+
- Shell features: Use any base image (debian, ubuntu, devcontainers/base)
204+
- Node.js features: Use `mcr.microsoft.com/devcontainers/javascript-node:20` or higher
205+
- TypeScript features: Use `mcr.microsoft.com/devcontainers/typescript-node:20` or higher
206+
- Features with mounts: Can test with Node.js base image (mounts are optional)
202207

203208
### Dependencies
204209
All features declare `installsAfter: ["ghcr.io/devcontainers/features/common-utils"]`

.github/workflows/test.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,17 @@ jobs:
3434
- features: angular-dev
3535
baseImage: mcr.microsoft.com/devcontainers/javascript-node:20
3636

37-
# local-mounts - SKIPPED: uses ${localEnv:...} syntax that cannot be tested in CI
38-
# The mounts and containerEnv with localEnv variables are evaluated at runtime
39-
# by VS Code/devcontainer CLI, not during docker build
37+
# package-auto-install - requires Node.js
38+
- features: package-auto-install
39+
baseImage: mcr.microsoft.com/devcontainers/javascript-node:20
40+
41+
# vite-plus - requires Node.js
42+
- features: vite-plus
43+
baseImage: mcr.microsoft.com/devcontainers/typescript-node:20
44+
45+
# typescript-dev - requires VS Code (extensions only, no install.sh logic)
46+
- features: typescript-dev
47+
baseImage: mcr.microsoft.com/devcontainers/typescript-node:20
4048

4149
steps:
4250
- name: Checkout

test/typescript-dev/test.sh

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
#!/bin/bash
22

33
# Test script for typescript-dev feature
4+
# Note: This feature only installs VS Code extensions and settings
5+
# Extensions are installed but cannot be verified without running VS Code
46

57
set -e
68

79
# Source test framework
810
source dev-container-features-test-lib
911

10-
# Feature-specific tests
11-
check "vscode settings are applied" test -n "$VSCODE_SETUP_COMPLETE" || true
12-
13-
check "vscode is running" pgrep code || true
14-
15-
# Check that common extensions would be installed (we can't verify directly, but check for marks)
16-
echo "✅ typescript-dev feature includes:"
17-
echo " - TypeScript tooling"
18-
echo " - Git integration"
19-
echo " - GitHub Copilot"
20-
echo " - Markdown support"
21-
echo " - Editor enhancements"
12+
# Simple confirmation that the feature ran
13+
echo "✅ typescript-dev feature configured successfully"
14+
echo ""
15+
echo "📦 This feature includes:"
16+
echo " - TypeScript & JavaScript tooling (ms-vscode.vscode-typescript-next, npm-intellisense, path-intellisense)"
17+
echo " - Git integration (GitLens, git-history, git-graph, PR support)"
18+
echo " - GitHub Copilot AI assistance"
19+
echo " - Markdown support (markdown-all-in-one, markdownlint, mermaid)"
20+
echo " - Code formatting and quality tools"
21+
echo ""
22+
echo "⚠️ VS Code extensions are installed but cannot be verified in CI environment"
23+
echo " They will be active when you use VS Code locally or in a container with GUI"
2224

2325
reportResults

test/vite-plus/test.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
#!/bin/bash
22

3-
# Test script for viteplus feature
3+
# Test script for vite-plus feature
44

55
set -e
66

77
# Source test framework
88
source dev-container-features-test-lib
99

1010
# Feature-specific tests
11-
check "viteplus-init helper exists" test -f /usr/local/bin/viteplus-init
12-
13-
check "viteplus-init is executable" test -x /usr/local/bin/viteplus-init
14-
1511
check "node is available" command -v node
1612

1713
check "npm is available" command -v npm
1814

19-
# Test that viteplus-init runs without error
20-
check "viteplus-init helper works" bash -c 'cd /tmp && /usr/local/bin/viteplus-init 2>&1 | grep -q "package.json"'
15+
check "vite CLI is available" command -v vite
16+
17+
check "vitest CLI is available" command -v vitest
2118

22-
# Check Oxc installation if enabled
19+
# Check Oxc installation (optional)
2320
if command -v oxc >/dev/null 2>&1; then
2421
check "oxc CLI is available" command -v oxc
2522
check "oxc version displays" oxc --version
2623
else
27-
echo "⚠️ Oxc CLI not installed (installOxc=false)"
24+
echo "⚠️ Oxc CLI not installed (installOxc=false or failed to install)"
2825
fi
2926

3027
reportResults

0 commit comments

Comments
 (0)