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

chore: disable app update on test #521

Merged
merged 10 commits into from
Nov 1, 2023
Merged
6 changes: 3 additions & 3 deletions .github/workflows/jan-electron-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Install yarn dependencies
run: |
yarn install
yarn build:plugins-darwin
yarn build:pull-plugins
env:
APP_PATH: "."
DEVELOPER_ID: ${{ secrets.DEVELOPER_ID }}
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
run: |
yarn config set network-timeout 300000
yarn install
yarn build:plugins
yarn build:pull-plugins

- name: Build and publish app
run: |
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
run: |
yarn config set network-timeout 300000
yarn install
yarn build:plugins
yarn build:pull-plugins

- name: Build and publish app
run: |
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/jan-electron-linter-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
yarn config set network-timeout 300000
yarn install
yarn lint
yarn build:plugins
yarn build
yarn build:pull-plugins
yarn build:test
yarn test
env:
CSC_IDENTITY_AUTO_DISCOVERY: "false"
Expand Down Expand Up @@ -76,9 +76,8 @@ jobs:
run: |
yarn config set network-timeout 300000
yarn install
yarn lint
yarn build:plugins
yarn build:win32
yarn build:pull-plugins
yarn build:test-win32
yarn test

test-on-ubuntu:
Expand All @@ -105,7 +104,6 @@ jobs:
echo -e "Display ID: $DISPLAY"
yarn config set network-timeout 300000
yarn install
yarn lint
yarn build:plugins
yarn build:linux
yarn build:pull-plugins
yarn build:test-linux
yarn test
4 changes: 3 additions & 1 deletion electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ function handleAppUpdates() {
});
autoUpdater.autoDownload = false;
autoUpdater.autoInstallOnAppQuit = true;
autoUpdater.checkForUpdates();
if (process.env.CI !== "e2e") {
autoUpdater.checkForUpdates();
}
}

/**
Expand Down
4 changes: 4 additions & 0 deletions electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
"test:e2e": "playwright test --workers=1",
"dev": "tsc -p . && electron .",
"build": "tsc -p . && electron-builder -p never -m",
"build:test": "tsc -p . && electron-builder --dir -p never -m",
"build:test-darwin": "tsc -p . && electron-builder -p never -m --x64 --arm64 --dir",
"build:test-win32": "tsc -p . && electron-builder -p never -w --dir",
"build:test-linux": "tsc -p . && electron-builder -p never -l --dir",
"build:darwin": "tsc -p . && electron-builder -p never -m --x64 --arm64",
"build:win32": "tsc -p . && electron-builder -p never -w",
"build:linux": "tsc -p . && electron-builder -p never --linux deb",
Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@
"dev:electron": "yarn workspace jan dev",
"dev:web": "yarn workspace jan-web dev",
"dev": "concurrently --kill-others \"yarn dev:web\" \"wait-on http://localhost:3000 && yarn dev:electron\"",
"test-local": "yarn lint && yarn build && yarn test",
"test-local": "yarn lint && yarn build:test && yarn test",
"build:core": "cd core && yarn install && yarn run build",
"build:web": "yarn workspace jan-web build && cpx \"web/out/**\" \"electron/renderer/\"",
"build:electron": "yarn workspace jan build",
"build:electron:test": "yarn workspace jan build:test",
"build:pull-plugins": "rimraf ./electron/core/pre-install/*.tgz && cd ./electron/core/pre-install && npm pack @janhq/inference-plugin @janhq/data-plugin @janhq/model-management-plugin @janhq/monitoring-plugin",
"build:plugins": "rimraf ./electron/core/pre-install/*.tgz && concurrently --kill-others-on-fail \"cd ./plugins/data-plugin && npm install && npm run postinstall\" \"cd ./plugins/inference-plugin && npm install && npm run postinstall\" \"cd ./plugins/model-management-plugin && npm install && npm run postinstall\" \"cd ./plugins/monitoring-plugin && npm install && npm run postinstall\" && concurrently --kill-others-on-fail \"cd ./plugins/data-plugin && npm run build:publish\" \"cd ./plugins/inference-plugin && npm run build:publish\" \"cd ./plugins/model-management-plugin && npm run build:publish\" \"cd ./plugins/monitoring-plugin && npm run build:publish\"",
"build:plugins-darwin": "rimraf ./electron/core/pre-install/*.tgz && concurrently \"cd ./plugins/data-plugin && npm install && npm run build:deps && npm run postinstall\" \"cd ./plugins/inference-plugin && npm install && npm run postinstall\" \"cd ./plugins/model-management-plugin && npm install && npm run postinstall\" \"cd ./plugins/monitoring-plugin && npm install && npm run postinstall\" && chmod +x ./.github/scripts/auto-sign.sh && ./.github/scripts/auto-sign.sh && concurrently \"cd ./plugins/data-plugin && npm run build:publish\" \"cd ./plugins/inference-plugin && npm run build:publish\" \"cd ./plugins/model-management-plugin && npm run build:publish\" \"cd ./plugins/monitoring-plugin && npm run build:publish\"",
"build": "yarn build:web && yarn build:electron",
"build:test": "yarn build:web && yarn build:electron:test",
"build:test-darwin": "yarn build:web && yarn workspace jan build:test-darwin",
"build:test-win32": "yarn build:web && yarn workspace jan build:test-win32",
"build:test-linux": "yarn build:web && yarn workspace jan build:test-linux",
"build:darwin": "yarn build:web && yarn workspace jan build:darwin",
"build:win32": "yarn build:web && yarn workspace jan build:win32",
"build:linux": "yarn build:web && yarn workspace jan build:linux",
Expand Down