-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
91 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,52 @@ | ||
name: Run VIP-cli tests | ||
name: Run linux based image | ||
on: | ||
pull_request | ||
|
||
env: | ||
NODE_OPTIONS: --unhandled-rejections=warn | ||
|
||
jobs: | ||
Run_windows_tests: | ||
name: Run Windows Tests | ||
Try_pull_image: | ||
name: Try pull Image | ||
runs-on: windows-latest | ||
steps: | ||
# To prevent issues with fixtures on Windows tests | ||
- name: Set git to use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
path: vip | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 'lts/*' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
working-directory: vip | ||
|
||
# - name: Unit Tests | ||
# working-directory: vip | ||
# run: npm run jest | ||
|
||
# - name: Build it | ||
# working-directory: vip | ||
# run: npm run pack | ||
|
||
- name: Test Command line | ||
working-directory: vip | ||
run: ./__tests__/e2e_test.bat | ||
- name: Image pull step | ||
run: docker pull ubuntu | ||
|
||
# name: Run VIP-cli tests | ||
# on: | ||
# pull_request | ||
|
||
# env: | ||
# NODE_OPTIONS: --unhandled-rejections=warn | ||
|
||
# jobs: | ||
# Run_windows_tests: | ||
# name: Run Windows Tests | ||
# runs-on: windows-latest | ||
# steps: | ||
# # To prevent issues with fixtures on Windows tests | ||
# - name: Set git to use LF | ||
# run: | | ||
# git config --global core.autocrlf false | ||
# git config --global core.eol lf | ||
|
||
# - name: Check out repository code | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# submodules: true | ||
# path: vip | ||
|
||
# - name: Setup Node | ||
# uses: actions/setup-node@v2 | ||
# with: | ||
# node-version: 'lts/*' | ||
|
||
# # - name: Install dependencies | ||
# # run: npm ci | ||
# # working-directory: vip | ||
|
||
# # - name: Unit Tests | ||
# # working-directory: vip | ||
# # run: npm run jest | ||
|
||
# - name: Test Command line | ||
# working-directory: vip | ||
# run: ./__tests__/e2e_test.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,57 @@ | ||
|
||
call npm pack | ||
@REM call DockerCli -SwitchLinuxEngine | ||
call docker version | ||
call where docker | ||
@REM call dir "C:\Program Files\Docker" | ||
call where docker-compose | ||
|
||
echo "== Installing vip" | ||
@REM call dir \s DockerCli.exe | ||
C: | ||
call dir \s DockerCli.exe | ||
@REM call dir "C:\ProgramData\Chocolatey" | ||
|
||
FOR /R "." %%f IN ( *.tgz) DO ( | ||
call npm i -g %%f | ||
) | ||
@REM call cat "C:\ProgramData\Docker\config\daemon.json" | ||
|
||
echo "== Running e2e tests" | ||
@REM call Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart | ||
call Install-Module -Name DockerMsftProvider -Repository PSGallery -Force | ||
call Get-PackageProvider -ListAvailableget-packagesource -ProviderName DockerMsftProvider | ||
|
||
call vip --help | ||
call wsl -l -o | ||
|
||
rem dev-env tests | ||
call wsl --status | ||
|
||
echo "== Creating dev-env" | ||
call systeminfo | ||
|
||
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 | ||
call docker pull ubuntu | ||
|
||
if NOT %errorlevel% == 0 ( | ||
echo "== Failed to create dev-env" | ||
exit 1 | ||
) | ||
@REM call npm pack | ||
|
||
echo "== Starting dev-env" | ||
@REM echo "== Installing vip" | ||
|
||
call vip dev-env start --skip-wp-versions-check | ||
@REM FOR /R "." %%f IN ( *.tgz) DO ( | ||
@REM call npm i -g %%f | ||
@REM ) | ||
|
||
if NOT %errorlevel% == 0 ( | ||
echo "== Dev-env failed to start" | ||
exit 1 | ||
) | ||
@REM echo "== Running e2e tests" | ||
|
||
@REM call vip --help | ||
|
||
@REM rem dev-env tests | ||
|
||
@REM echo "== Creating dev-env" | ||
|
||
@REM 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 | ||
|
||
@REM if NOT %errorlevel% == 0 ( | ||
@REM echo "== Failed to create dev-env" | ||
@REM exit 1 | ||
@REM ) | ||
|
||
@REM echo "== Starting dev-env" | ||
|
||
@REM call vip dev-env start --skip-wp-versions-check | ||
|
||
@REM if NOT %errorlevel% == 0 ( | ||
@REM echo "== Dev-env failed to start" | ||
@REM exit 1 | ||
@REM ) |