Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ This project follows [Conventional Commits](https://www.conventionalcommits.org/
4. Create `test/<feature-name>/test.sh`
5. Update main `README.md`
6. Update this `agents.md` file
7. **IMPORTANT: Update `.github/workflows/test.yml`** - Add the new feature to the test matrix with appropriate base image
- Shell features: Use any base image (debian, ubuntu, devcontainers/base)
- Node.js features: Use `mcr.microsoft.com/devcontainers/javascript-node:20` or higher
- TypeScript features: Use `mcr.microsoft.com/devcontainers/typescript-node:20` or higher
- Features with mounts: Can test with Node.js base image (mounts are optional)

### Dependencies
All features declare `installsAfter: ["ghcr.io/devcontainers/features/common-utils"]`
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,17 @@ jobs:
- features: angular-dev
baseImage: mcr.microsoft.com/devcontainers/javascript-node:20

# local-mounts - SKIPPED: uses ${localEnv:...} syntax that cannot be tested in CI
# The mounts and containerEnv with localEnv variables are evaluated at runtime
# by VS Code/devcontainer CLI, not during docker build
# package-auto-install - requires Node.js
- features: package-auto-install
baseImage: mcr.microsoft.com/devcontainers/javascript-node:20

# vite-plus - requires Node.js
- features: vite-plus
baseImage: mcr.microsoft.com/devcontainers/typescript-node:20

# typescript-dev - requires VS Code (extensions only, no install.sh logic)
- features: typescript-dev
baseImage: mcr.microsoft.com/devcontainers/typescript-node:20

steps:
- name: Checkout
Expand Down
26 changes: 14 additions & 12 deletions test/typescript-dev/test.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
#!/bin/bash

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

set -e

# Source test framework
source dev-container-features-test-lib

# Feature-specific tests
check "vscode settings are applied" test -n "$VSCODE_SETUP_COMPLETE" || true

check "vscode is running" pgrep code || true

# Check that common extensions would be installed (we can't verify directly, but check for marks)
echo "✅ typescript-dev feature includes:"
echo " - TypeScript tooling"
echo " - Git integration"
echo " - GitHub Copilot"
echo " - Markdown support"
echo " - Editor enhancements"
# Simple confirmation that the feature ran
echo "✅ typescript-dev feature configured successfully"
echo ""
echo "📦 This feature includes:"
echo " - TypeScript & JavaScript tooling (ms-vscode.vscode-typescript-next, npm-intellisense, path-intellisense)"
echo " - Git integration (GitLens, git-history, git-graph, PR support)"
echo " - GitHub Copilot AI assistance"
echo " - Markdown support (markdown-all-in-one, markdownlint, mermaid)"
echo " - Code formatting and quality tools"
echo ""
echo "⚠️ VS Code extensions are installed but cannot be verified in CI environment"
echo " They will be active when you use VS Code locally or in a container with GUI"

reportResults
15 changes: 6 additions & 9 deletions test/vite-plus/test.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
#!/bin/bash

# Test script for viteplus feature
# Test script for vite-plus feature

set -e

# Source test framework
source dev-container-features-test-lib

# Feature-specific tests
check "viteplus-init helper exists" test -f /usr/local/bin/viteplus-init

check "viteplus-init is executable" test -x /usr/local/bin/viteplus-init

check "node is available" command -v node

check "npm is available" command -v npm

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

check "vitest CLI is available" command -v vitest

# Check Oxc installation if enabled
# Check Oxc installation (optional)
if command -v oxc >/dev/null 2>&1; then
check "oxc CLI is available" command -v oxc
check "oxc version displays" oxc --version
else
echo "⚠️ Oxc CLI not installed (installOxc=false)"
echo "⚠️ Oxc CLI not installed (installOxc=false or failed to install)"
fi

reportResults