-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·27 lines (21 loc) · 861 Bytes
/
test.sh
File metadata and controls
executable file
·27 lines (21 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
# Simple test script to run the tests in docker
# Error on any non-zero command, and print the commands as they're run
set -ex
# Make sure we have the docker utility
if ! command -v docker; then
echo "🐋 Please install docker first 🐋"
exit 1
fi
# Set the docker image name to default to repo basename
DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME:-$(basename -s .git "$(git remote --verbose | awk 'NR==1 { print tolower($2) }')")}
# build the docker image
DOCKER_BUILDKIT=1 docker build -t "$DOCKER_IMAGE_NAME" -f Dockerfile .
# test the install script; everything but vscode extensions, which weirdly fail
docker run --rm \
-v "$(pwd)":/mnt/workspace \
-t "$DOCKER_IMAGE_NAME" bash -c ' \
DOTBOT_NO_SUBMODULE_UPDATE=1 \
PATH=~/.cargo/bin:$PATH \
DOTFILES_INSTALL_VSCODE_EXTS=n ./install-all
'