File tree 3 files changed +9
-19
lines changed
.github/actions/smoke-test
3 files changed +9
-19
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,9 @@ echo "(*) Installing @devcontainer/cli"
8
8
npm install -g @devcontainers/cli
9
9
10
10
id_label=" test-container=${IMAGE} "
11
- id_image=" universal-test-image"
12
- if [ $IMAGE == " universal" ]; then
13
- echo " (*) Building image - ${IMAGE} "
14
- devcontainer build --image-name ${id_image} --workspace-folder " src/${IMAGE} /"
15
- echo " (*) Starting container - ${IMAGE} "
16
- devcontainer up --id-label ${id_label} --workspace-folder " src/${IMAGE} /"
17
- else
18
- echo " (*) Building image - ${IMAGE} "
19
- devcontainer up --id-label ${id_label} --workspace-folder " src/${IMAGE} /"
20
- fi
11
+ id_image=" ${IMAGE} -test-image"
12
+ echo " (*) Building image - ${IMAGE} "
13
+ devcontainer build --image-name ${id_image} --workspace-folder " src/${IMAGE} /"
14
+ echo " (*) Starting container - ${IMAGE} "
15
+ devcontainer up --id-label ${id_label} --workspace-folder " src/${IMAGE} /"
16
+
Original file line number Diff line number Diff line change @@ -36,14 +36,8 @@ check_image_size() {
36
36
# call install_bc
37
37
install_bc
38
38
39
- if [ $IMAGE == " universal" ]; then
40
- # Read the image id of the original image, not the modified image with uid and gid
41
- IMAGE_ID=$( docker images -q --filter=reference=" $id_image " )
42
- else
43
- CONTAINER_ID=$( docker ps -q --filter " label=test-container=$IMAGE " )
44
- # Find the image ID of the container
45
- IMAGE_ID=$( docker inspect --format=' {{.Image}}' " $CONTAINER_ID " )
46
- fi
39
+ # Read the image id of the original image, not the modified image with uid and gid
40
+ IMAGE_ID=$( docker images -q --filter=reference=" $id_image " )
47
41
# Find the size of the image
48
42
IMAGE_SIZE=$( docker image inspect --format=' {{.Size}}' " $IMAGE_ID " )
49
43
# Output the size
Original file line number Diff line number Diff line change 10
10
# Run actual test
11
11
echo " (*) Running test..."
12
12
id_label=" test-container=${IMAGE} "
13
- id_image=" universal -test-image"
13
+ id_image=" ${IMAGE} -test-image"
14
14
devcontainer exec --workspace-folder $( pwd) /src/$IMAGE --id-label ${id_label} /bin/sh -c ' set -e && if [ -f "test-project/test.sh" ]; then cd test-project && if [ "$(id -u)" = "0" ]; then chmod +x test.sh; else sudo chmod +x test.sh; fi && ./test.sh; else ls -a; fi'
15
15
16
16
echo " (*) Docker image details..."
You can’t perform that action at this time.
0 commit comments