Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev-env] e2e Windows tests #1073

Merged
merged 5 commits into from
Aug 18, 2022
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: 2 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
34 changes: 34 additions & 0 deletions __tests__/e2e_test.bat
Original file line number Diff line number Diff line change
@@ -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
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to check that the config files for the environment were actually created?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Done.


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
)