test: add TypeScript template to E2E test matrix (#6768)

* test: add TypeScript template to E2E test

* fix

* fix

* fix...

* exclude this

* refactor
This commit is contained in:
Joshua Chen 2022-02-27 09:20:59 +08:00 committed by GitHub
parent 68a55f0d11
commit bafa4711b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 13 deletions

View file

@ -12,13 +12,16 @@ NEW_VERSION="$(node -p "require('./packages/docusaurus/package.json').version").
CONTAINER_NAME="verdaccio"
EXTRA_OPTS=""
usage() { echo "Usage: $0 [-s]" 1>&2; exit 1; }
usage() { echo "Usage: $0 [-s] [-t]" 1>&2; exit 1; }
while getopts ":ns" o; do
while getopts ":st" o; do
case "${o}" in
s)
EXTRA_OPTS="${EXTRA_OPTS} --skip-install"
;;
t)
EXTRA_OPTS="${EXTRA_OPTS} --typescript"
;;
*)
usage
;;
@ -52,7 +55,7 @@ cd ..
npm_config_registry="$CUSTOM_REGISTRY_URL" npx create-docusaurus@"$NEW_VERSION" test-website classic $EXTRA_OPTS
# Stop Docker container
if [[ -z "${KEEP_CONTAINER:-}" ]] && ( $(docker container inspect "$CONTAINER_NAME" > /dev/null 2>&1) ); then
if [[ -z "${KEEP_CONTAINER:-true}" ]] && ( $(docker container inspect "$CONTAINER_NAME" > /dev/null 2>&1) ); then
# Remove Docker container
docker container stop $CONTAINER_NAME > /dev/null
fi