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: 1 addition & 4 deletions .github/actions/smoke-test/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: 'Smoke test'
description: 'Builds and smoke-tests a dev container template'
inputs:
template:
description: 'Template to test'
Expand All @@ -7,10 +8,6 @@ inputs:
runs:
using: composite
steps:
- name: Checkout master
id: checkout_release
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Build template
id: build_template
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/smoke-test/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pushd "${SRC_DIR}"
# Configure templates only if `devcontainer-template.json` contains the `options` property.
OPTION_PROPERTY=( $(jq -r '.options' devcontainer-template.json) )

if [ "${OPTION_PROPERTY}" != "" ] && [ "${OPTION_PROPERTY}" != "null" ] ; then
if [ "${OPTION_PROPERTY}" != "" ] && [ "${OPTION_PROPERTY}" != "null" ] ; then
OPTIONS=( $(jq -r '.options | keys[]' devcontainer-template.json) )

if [ "${OPTIONS[0]}" != "" ] && [ "${OPTIONS[0]}" != "null" ] ; then
Expand Down Expand Up @@ -43,7 +43,7 @@ if [ -d "${TEST_DIR}" ] ; then
DEST_DIR="${SRC_DIR}/test-project"
mkdir -p ${DEST_DIR}
cp -Rp ${TEST_DIR}/* ${DEST_DIR}
cp test/test-utils/test-utils.sh ${DEST_DIR}
cp test/test-utils/* ${DEST_DIR}
fi

export DOCKER_BUILDKIT=1
Expand Down
11 changes: 3 additions & 8 deletions test/azure-functions-dotnet/test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/bash
cd $(dirname "$0")
source test-utils.sh
set -e

# Template specific tests
check "dotnet" dotnet --version
check "func" func --version

# Report result
reportResults
cd "$(dirname "$0")"
bash run-template-checks.sh "dotnet" dotnet --version
11 changes: 3 additions & 8 deletions test/azure-functions-java/test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/bash
cd $(dirname "$0")
source test-utils.sh
set -e

# Template specific tests
check "java" java -version
check "func" func --version

# Report result
reportResults
cd "$(dirname "$0")"
bash run-template-checks.sh "java" java -version
11 changes: 3 additions & 8 deletions test/azure-functions-node/test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/bash
cd $(dirname "$0")
source test-utils.sh
set -e

# Template specific tests
check "node" node --version
check "func" func --version

# Report result
reportResults
cd "$(dirname "$0")"
bash run-template-checks.sh "node" node --version
11 changes: 3 additions & 8 deletions test/azure-functions-powershell/test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/bash
cd $(dirname "$0")
source test-utils.sh
set -e

# Template specific tests
check "powershell" pwsh --version
check "func" func --version

# Report result
reportResults
cd "$(dirname "$0")"
bash run-template-checks.sh "powershell" pwsh --version
11 changes: 3 additions & 8 deletions test/azure-functions-python/test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/bash
cd $(dirname "$0")
source test-utils.sh
set -e

# Template specific tests
check "python" python --version
check "func" func --version

# Report result
reportResults
cd "$(dirname "$0")"
bash run-template-checks.sh "python" python --version
13 changes: 13 additions & 0 deletions test/test-utils/run-template-checks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -e

cd "$(dirname "$0")"
source test-utils.sh

LABEL="$1"
shift

check "$LABEL" "$@"
check "func" func --version

reportResults