Commit 5332b952 authored by Josh Spicer's avatar Josh Spicer Committed by GitHub

add feature stubs for all

parent 3e7c0308
...@@ -11,7 +11,7 @@ jobs: ...@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
features: [ "go", "dotnet", "go,dotnet" ] features: [ "go", "dotnet", "go,dotnet" ]
baseImage: [ "mcr.microsoft.com/vscode/devcontainers/base:focal" ] baseImage: [ "mcr.microsoft.com/vscode/devcontainers/base:focal" ]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
......
{
"configurations": [
{
"name": "Test All Features",
"type": "node",
"program": "/home/codespace/.nodejs/current/bin/npx",
"args": [
"-y",
"dev-containers-cli-0.1.0.tgz",
"features-test",
"-d",
"/workspaces/features",
"-f",
"${input:selectedFeatures}"
],
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"autoAttachChildProcesses": false,
"request": "launch",
},
{
"name": "Test Features (input)",
"type": "node",
"program": "/home/codespace/.nodejs/current/bin/npx",
"args": [
"-y",
"dev-containers-cli-0.1.0.tgz",
"features-test",
"--directory",
"/workspaces/features",
"--features",
"${input:selectedFeatures}",
"--base-image",
"${input:selectedBaseImage}"
],
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"autoAttachChildProcesses": false,
"request": "launch",
}
],
"inputs": [
{
"id": "selectedFeatures",
"type": "promptString",
"description": "Comma separated list of features to test",
},
{
"id": "selectedBaseImage",
"type": "promptString",
"description": "Base Image",
"default": "mcr.microsoft.com/vscode/devcontainers/base:focal"
}
]
}
\ No newline at end of file
#!/usr/bin/env python3
import os
featureDirs = os.listdir('./src')
count = len(featureDirs)
for fDir in featureDirs:
if os.path.isdir('./test/' + fDir):
print('already exists: ', fDir)
continue
os.mkdir('./test/' + fDir)
f = open(f'./test/{fDir}/test.sh', 'w')
contents = f"""
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" {fDir} --version
# Report result
reportResults"""
f.write(contents)
File mode changed from 100644 to 100755
...@@ -5,7 +5,15 @@ ...@@ -5,7 +5,15 @@
"options": { "options": {
"version": { "version": {
"type": "string", "type": "string",
"enum": ["latest", "os-provided", "3.10", "3.9", "3.8", "3.7", "3.6"], "enum": [
"latest",
"os-provided",
"3.10",
"3.9",
"3.8",
"3.7",
"3.6"
],
"default": "os-provided", "default": "os-provided",
"description": "Select a Python version to install." "description": "Select a Python version to install."
}, },
...@@ -36,7 +44,10 @@ ...@@ -36,7 +44,10 @@
"PIPX_BIN_DIR": "/usr/local/py-utils/bin", "PIPX_BIN_DIR": "/usr/local/py-utils/bin",
"PATH": "${PYTHON_PATH}/bin:${PATH}:${PIPX_BIN_DIR}" "PATH": "${PYTHON_PATH}/bin:${PATH}:${PIPX_BIN_DIR}"
}, },
"extensions": ["ms-python.python", "ms-python.vscode-pylance"], "extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
],
"settings": { "settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python", "python.defaultInterpreterPath": "/usr/local/bin/python",
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
...@@ -53,4 +64,4 @@ ...@@ -53,4 +64,4 @@
"app": "", "app": "",
"file": "install.sh" "file": "install.sh"
} }
} }
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" conda --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" aws --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" az --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "jq" jq --version
check "curl" curl --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
echo 'NO TESTS FOR ME YET!'
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" docker --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" docker --version
# Report result
reportResults
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
set -e set -e
# Import test library # Optional: Import test library
source featuresTest.library.sh root source dev-container-features-test-lib
# Definition specific tests # Definition specific tests
check "dotnet" dotnet --info check "dotnet" dotnet --info
......
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" git-lfs --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" git --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" gh --version
# Report result
reportResults
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
set -e set -e
# Import test library # Optional: Import test library
source featuresTest.library.sh root source dev-container-features-test-lib
check "version" go version check "version" go version
......
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" gradle --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" hugo version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" java --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" jupyter --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "kube" kubectl
check "helm" helm version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" maven --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" node --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" pwsh --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" python --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" ruby --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
check "version" rust --version
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
echo 'NO TESTS FOR ME YET!'
# Report result
reportResults
\ No newline at end of file
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
echo 'NO TESTS FOR ME YET!'
# Report result
reportResults
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment