mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
update integration runner to output logs on failure
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
af67b90e96
commit
dffd585a05
@ -37,7 +37,7 @@ jobs:
|
||||
displayName: Cache Yarn packages
|
||||
- script: make install-deps
|
||||
displayName: Install dependencies
|
||||
- script: make integration-win
|
||||
- script: yarn integration:win
|
||||
displayName: Run integration tests
|
||||
- script: make build
|
||||
condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
|
||||
@ -76,7 +76,7 @@ jobs:
|
||||
displayName: Install dependencies
|
||||
- script: make test
|
||||
displayName: Run tests
|
||||
- script: make integration-mac
|
||||
- script: yarn integration:mac
|
||||
displayName: Run integration tests
|
||||
- script: make build
|
||||
condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
|
||||
@ -132,7 +132,7 @@ jobs:
|
||||
# Although the kube and minikube config files are in placed $HOME they are owned by root
|
||||
sudo chown -R $USER $HOME/.kube $HOME/.minikube
|
||||
displayName: Install integration test dependencies
|
||||
- script: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' make integration-linux
|
||||
- script: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' yarn integration:linux
|
||||
displayName: Run integration tests
|
||||
- bash: |
|
||||
sudo chown root:root /
|
||||
|
||||
14
Makefile
14
Makefile
@ -31,18 +31,6 @@ lint:
|
||||
test: download-bins
|
||||
yarn test
|
||||
|
||||
integration-linux:
|
||||
yarn build:linux
|
||||
yarn integration
|
||||
|
||||
integration-mac:
|
||||
yarn build:mac
|
||||
yarn integration
|
||||
|
||||
integration-win:
|
||||
yarn build:win
|
||||
yarn integration
|
||||
|
||||
test-app:
|
||||
yarn test
|
||||
|
||||
@ -62,4 +50,4 @@ else
|
||||
rm -rf binaries/client/*
|
||||
rm -rf dist/*
|
||||
rm -rf static/build/*
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -23,7 +23,10 @@
|
||||
"build:mac": "yarn compile && electron-builder --mac --dir -c.productName=Lens",
|
||||
"build:win": "yarn compile && electron-builder --win --dir -c.productName=Lens",
|
||||
"test": "jest --env=jsdom src $@",
|
||||
"integration": "jest --coverage integration $@",
|
||||
"integration-runner": "jest --coverage integration $@",
|
||||
"integration:linux": "scripts/integration.sh linux",
|
||||
"integration:mac": "scripts/integration.sh mac",
|
||||
"integration:win": "scripts/integration.sh win",
|
||||
"dist": "yarn compile && electron-builder --publish onTag",
|
||||
"dist:win": "yarn compile && electron-builder --publish onTag --x64 --ia32",
|
||||
"dist:dir": "yarn dist --dir -c.compression=store -c.mac.identity=null",
|
||||
|
||||
28
scripts/integration.sh
Executable file
28
scripts/integration.sh
Executable file
@ -0,0 +1,28 @@
|
||||
case $1 in
|
||||
mac)
|
||||
find ~/Library/Logs/Lens -type file -name *.log -delete
|
||||
;;
|
||||
linux)
|
||||
find ~/.config/Lens -type file -name *.log -delete
|
||||
;;
|
||||
win)
|
||||
find %APPDATA%/Lens -type file -name *.log -delete
|
||||
;;
|
||||
esac
|
||||
|
||||
yarn build:$1
|
||||
DEBUG=true yarn integration-runner
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
case $1 in
|
||||
mac)
|
||||
find ~/Library/Logs/Lens -type file -name *.log -exec cat {} \;
|
||||
;;
|
||||
linux)
|
||||
find ~/.config/Lens -type file -name *.log -exec cat {} \;
|
||||
;;
|
||||
win)
|
||||
find %APPDATA%/Lens -type file -name *.log -exec cat {} \;
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user