diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f50d77049..ff973f6e9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,8 +34,7 @@ jobs: - name: Unit Tests working-directory: vip run: npm run jest - + - name: Test Command line working-directory: vip - run: | - node ./dist/bin/vip app + run: ./__tests__/e2e_test.bat diff --git a/__tests__/e2e_test.bat b/__tests__/e2e_test.bat new file mode 100644 index 000000000..d98518063 --- /dev/null +++ b/__tests__/e2e_test.bat @@ -0,0 +1,34 @@ +call npm pack + +echo "== Installing vip" + +FOR /R "." %%f IN ( *.tgz) DO ( + call npm i -g %%f +) + +echo "== Running e2e tests" + +call vip --help + +rem dev-env tests + +echo "== Creating dev-env" + +call vip dev-env create --client-code image --title Test --multisite false --php 8.0 --wordpress 6.0 --mu-plugins image -e false -p false -x false + +if NOT %errorlevel% == 0 ( + echo "== Failed to create dev-env" + exit 1 +) + +call ls -al C:\Users\runneradmin\.local\share\vip\dev-environment\vip-local +if NOT %errorlevel% == 0 ( + echo "== local environment folder not found" + exit 1 +) + +call cat C:\Users\runneradmin\.local\share\vip\dev-environment\vip-local\.lando.yml +if NOT %errorlevel% == 0 ( + echo "== local environment lando config not found" + exit 1 +)