Skip to content

Commit

Permalink
Merge branch 'release/2.2.0' into 4023-point-delegate-search-to-deleg…
Browse files Browse the repository at this point in the history
…ate-profile
  • Loading branch information
ManuGowda authored Dec 28, 2021
2 parents c24846c + 332c3f2 commit 8853657
Show file tree
Hide file tree
Showing 154 changed files with 2,528 additions and 1,482 deletions.
48 changes: 21 additions & 27 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,25 @@ pipeline {
}
}
}
stage('build') {
stage('lint') {
steps {
parallel (
"lint": {
ansiColor('xterm') {
nvm(getNodejsVersion()) {
sh 'npm run lint'
}
}
},
"linux": {
withCredentials([string(credentialsId: 'github-lisk-token', variable: 'GH_TOKEN')]) {
nvm(getNodejsVersion()) {
sh '''
cp -R /home/lisk/fonts/basier-circle src/assets/fonts
cp -R /home/lisk/fonts/gilroy src/assets/fonts
npm run build
npm run install:electron:dependencies
npm run dist:linux
'''
}
}
archiveArtifacts allowEmptyArchive: true, artifacts: 'dist/lisk-linux-*'
archiveArtifacts allowEmptyArchive: true, artifacts: 'dist/latest-linux.yml'
stash includes: 'app/build/', name: 'build'
ansiColor('xterm') {
nvm(getNodejsVersion()) {
sh 'npm run lint'
}
)
}
}
}
stage('build') {
steps {
nvm(getNodejsVersion()) {
sh '''
cp -R /home/lisk/fonts/basier-circle src/assets/fonts
cp -R /home/lisk/fonts/gilroy src/assets/fonts
npm run build
'''
}
stash includes: 'app/build/', name: 'build'
}
}
stage('deploy') {
Expand All @@ -58,7 +50,8 @@ pipeline {
stage('test') {
steps {
parallel (
"cypress": {
// cypress
"end-to-end": {
nvm(getNodejsVersion()) {
ansiColor('xterm') {
wrap([$class: 'Xvfb']) {
Expand All @@ -67,7 +60,8 @@ pipeline {
}
}
},
"jest": {
// jest
"unit": {
nvm(getNodejsVersion()) {
ansiColor('xterm') {
sh 'ON_JENKINS=true npm run test'
Expand Down
58 changes: 58 additions & 0 deletions Jenkinsfile.builds
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@Library('lisk-jenkins') _

pipeline {
agent none
stages {
stage('package') {
parallel {
stage('linux, windows') {
agent { node { label 'lisk-desktop' } }
steps {
cleanWs(patterns: [[pattern: 'dist/lisk-*-*', type: 'INCLUDE'], [pattern: 'dist/latest-*.yml', type: 'INCLUDE']])
nvm(getNodejsVersion()) {
sh '''
npm ci
cp -R /home/lisk/fonts/basier-circle src/assets/fonts
cp -R /home/lisk/fonts/gilroy src/assets/fonts
npm run build
npm run install:electron:dependencies
npm run dist:linux
'''
sh '''
export DEBUG=electron-builder
#npm run dist:win # does not work
'''
}
}
post {
success {
archiveArtifacts artifacts: 'dist/lisk-*-*, dist/latest-*.yml'
}
}
}
stage('darwin') {
agent { node { label 'darwin' } }
steps {
cleanWs(patterns: [[pattern: 'dist/lisk-mac-*-*', type: 'INCLUDE'], [pattern: 'dist/latest-mac-*.yml', type: 'INCLUDE']])
nvm(getNodejsVersion()) {
sh '''
npm ci
cp -R /Users/jenkins/fonts/basier-circle src/assets/fonts
cp -R /Users/jenkins/fonts/gilroy src/assets/fonts
npm run build
npm run install:electron:dependencies
npm run dist:mac -- --publish never
'''
}
}
post {
success {
archiveArtifacts artifacts: 'dist/lisk-mac-*, dist/latest-mac.yml'
}
}
}
}
}
}
}
// vim: filetype=groovy
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ npm run dev

Open http://localhost:8080

For ease of development, you can set the following query string to see network options in login page:
```
http://localhost:8080/#/?showNetwork=true
```

If you are actively developing in a specific route, and want to be automatically signed in every time you reload the page, please add the following input pairs to your localStorage:

_loginKey_: _a valid passphrase_
Expand All @@ -60,7 +55,7 @@ localStorage.setItem('hwWalletAutoLogin', true);
You can use the same approach to define a desired network to which Lisk Desktop connects:

```
localStorage.setItem('liskCoreUrl', 'http://localhost:4000') // desired node to log in into
localStorage.setItem('liskServiceUrl', 'http://localhost:4000') // desired node to log in into
```

### Build
Expand All @@ -75,12 +70,12 @@ npm run build
Under the hood, this script runs

```
npm run build-prod
npm run build:prod
```
to build the React app under `src/` and

```
npm run build-electron
npm run build:electron
```
to build the electron app under `app/` using webpack. You can run the above scripts individually if you're looking to see the changes solely on one of the two said applications.

Expand All @@ -97,7 +92,7 @@ npm run start
To launch a version which supports hardware wallets, you can run

```
npm run dev-hardware-wallet
npm run dev:hw
```

or to launch electron and receive live updates from already running `webpack-dev-server` on port `8080` and you can run
Expand Down Expand Up @@ -144,17 +139,20 @@ npm run test

#### Run each time a file changes
```
npm run test-live
npm run test:live
```

### E2E tests
In order to run e2e tests you need to install [lisk-core](https://github.com/LiskHQ/lisk)
In order to run e2e tests you need to install [lisk-core](https://github.com/LiskHQ/lisk-core) as well as [lisk-service](https://github.com/LiskHQ/lisk-service).

#### Setup core
#### Setup Lisk Core

Setup a lisk test node as described in Preparing Node headline under [the tests section of Lisk Framework README](https://github.com/LiskHQ/lisk-sdk/tree/development/framework).

Run lisk test node with [pm2](http://pm2.keymetrics.io/) on `localhost:4000`
#### Setup Service

Run Lisk Service against an already running local node as described in Preparing Node headline under [the installation section of Lisk Service README](https://github.com/liskhq/lisk-service#installation).


#### Run

Expand Down Expand Up @@ -200,7 +198,6 @@ http://localhost:6006/
├── libs/ # Modules which can be consumed individually in other projects.
├── node_modules/ # 3rd-party libraries and utilities.
├── src/ # Application source code.
│ ├── actions/ # Store actions reside here and are broken into script files dedicated to each system entity.
│ ├── app/ # The bootstrap React application
│ ├── assets/ # Static files (images, fonts, etc)
│ ├── components/ # React presentational components are located here.
Expand All @@ -211,6 +208,7 @@ http://localhost:6006/
│ ├── context/ # React context configuration files
│ ├── hooks/ # React custom hooks
│ ├── store/ # Redux store resides here.
│ │ ├── actions/ # Store actions reside here and are broken into script files dedicated to each system entity.
│ │ ├── middlewares/ # All the Redux middlewares are places here and have their dedicated script files based on the system entities.
│ │ ├── reducers/ # Redux reducers are located here. similar to actions and reducers, they are placed in script files named after the entity they represent.
│ ├── utils/ # Utility functions
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lisk-desktop",
"version": "2.1.0",
"version": "2.2.0-beta.1",
"productName": "Lisk",
"description": "Lisk",
"main": "./build/main.js",
Expand Down
3 changes: 3 additions & 0 deletions app/src/modules/autoUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export default ({ // eslint-disable-line max-statements
autoUpdater.autoDownload = false;

autoUpdater.checkForUpdatesAndNotify();
setInterval(() => {
autoUpdater.checkForUpdatesAndNotify();
}, 24 * 60 * 60 * 1000);

autoUpdater.on('error', (error) => {
// eslint-disable-next-line no-console
Expand Down
15 changes: 9 additions & 6 deletions app/src/modules/autoUpdater.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('autoUpdater', () => {
expect(params.autoUpdater.checkForUpdatesAndNotify).to.have.been.calledWithExactly();
});

it.skip('should check for updates every 24 hours', () => {
it('should check for updates every 24 hours', () => {
autoUpdater(params);
expect(params.autoUpdater.checkForUpdatesAndNotify).to.have.callCount(1);
clock.tick(24 * 60 * 60 * 1000);
Expand Down Expand Up @@ -167,14 +167,17 @@ describe('autoUpdater', () => {
expect(params.win.send).to.have.been.calledWith({ event: 'downloadUpdateStart' });
});

/* it('should not download the update if update is available and the "Later" button was pressed',
() => {
autoUpdater(params);
it('should send update:available event when update is available', () => {
const newPrams = { ...params, electron };
autoUpdater(newPrams);
callbacks['update-available']({ version });
callbacks.dialog(1);
expect(params.win.send).to.have.been.calledWith({
event: 'update:available',
value: { releaseNotes: undefined, version },
});

expect(params.autoUpdater.downloadUpdate).to.not.have.been.calledWith();
}); */
});

it('should set the progress bar when being in download progress', () => {
autoUpdater(params);
Expand Down
Loading

0 comments on commit 8853657

Please sign in to comment.