Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #178 from PureStake/master
Browse files Browse the repository at this point in the history
Release 1.3.0-b
  • Loading branch information
purestaketdb authored Dec 29, 2020
2 parents c8b4099 + 5f362a9 commit 1d39528
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 28 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: Build and Test

on:
push:
Expand All @@ -16,10 +16,8 @@ jobs:
- uses: actions/setup-node@v2-beta
with:
node-version: '12.15'
- name: Install test dependencies
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
run: (cd ./packages/common && npm install); (cd ./packages/crypto && npm install); (cd ./packages/storage && npm install); (cd ./packages/ui && npm install); (cd ./packages/extension && npm install); (cd ./packages/dapp && npm install);
- name: Install build dependencies
run: npm run install:extension
- name: Run unit tests
run: npm run test:unit
end_to_end_tests:
Expand All @@ -32,7 +30,7 @@ jobs:
- uses: actions/setup-node@v2-beta
with:
node-version: '12.15'
- name: Install build dependencies
- name: Install test dependencies
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
run: npm run postinstall
Expand All @@ -48,4 +46,23 @@ jobs:
with:
name: screenshot
path: ./packages/test-project/screenshots/*.png
retention-days: 5
retention-days: 5
build:
name: Zip and Upload Build
runs-on: ubuntu-latest
env:
CI: 'true'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: '12.15'
- name: Install build dependencies
run: npm run install:extension
- name: Build
run: npm run build
- name: Upload build artifact
uses: actions/upload-artifact@v2
with:
name: build
path: ./dist/*
14 changes: 5 additions & 9 deletions .github/workflows/zip-release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Deployment
name: Release Deployment

on:
release:
types:
- released

jobs:
test_zip_upload:
runs-on: ubuntu-latest
Expand All @@ -13,16 +15,10 @@ jobs:
node-version: '12.15'
- name: Delete all dist
run: npm run clean
- name: Install testing dependencies
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
run: npm install
- name: Install dependencies
run: npm run install:extension
- name: Build
run: npm run build
- name: Run headful puppeteer tests
uses: djp3/puppeteer-headful@master
with:
args: npm test
- name: Zip up release
id: zip_up
run: zip -r AlgoSigner.zip ./dist/*
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
"PureStake"
],
"scripts": {
"install:extension": "(cd ./packages/common && npm install); (cd ./packages/crypto && npm install); (cd ./packages/storage && npm install); (cd ./packages/ui && npm install); (cd ./packages/extension && npm install); (cd ./packages/dapp && npm install);",
"install:test": "(cd ./packages/test-project && npm install);",
"build": "(cd ./packages/common && npm run build); (cd ./packages/crypto && npm run build); (cd ./packages/storage && npm run build); (cd ./packages/ui && npm run build); (cd ./packages/extension && npm run build); (cd ./packages/dapp && npm run build);",
"build:ui": "cd ./packages/ui && npm run build && cp -r ./dist/* ../../dist/",
"build:extension": "cd ./packages/extension && npm run build && cp -r ./dist/* ../../dist/",
"copy": "mkdir -p ./dist && cp -r ./packages/extension/dist/* dist/ && cp -r ./packages/ui/dist/* dist/ && cp -r ./packages/dapp/dist/* dist/ && mkdir -p ./dist/docs && cp -r ./docs/* dist/docs/",
"clean": "rm -rf ./dist/* && rm -rf ./packages/common/dist/* && rm -rf ./packages/crypto/dist/* && rm -rf ./packages/dapp/dist/* && rm -rf ./packages/extension/dist/* && rm -rf ./packages/storage/dist/* && rm -rf ./packages/ui/dist/* && rm -rf ./packages/dapp/lib/*",
"postbuild": "npm run copy",
"postinstall": "(cd ./packages/common && npm install); (cd ./packages/crypto && npm install); (cd ./packages/storage && npm install); (cd ./packages/ui && npm install); (cd ./packages/extension && npm install); (cd ./packages/dapp && npm install); (cd ./packages/test-project && npm install);",
"copy": "mkdir -p ./dist && cp -r ./packages/extension/dist/* dist/ && cp -r ./packages/ui/dist/* dist/ && cp -r ./packages/dapp/dist/* dist/ && mkdir -p ./dist/docs && cp -r ./docs/* dist/docs/",
"prebuild": "rm -rf ./dist/*",
"postbuild": "npm run copy",
"postinstall": "npm run install:extension && npm run install:test",
"coveragetest": "cd ./packages/test-project && npm run coveragetest",
"test": "npm run test:unit && npm run test:e2e",
"test:unit": "(cd ./packages/crypto && npm run test) && (cd ./packages/extension && npm run test) && (cd ./packages/ui && npm run test) && (cd ./packages/dapp && npm run test) && (cd ./packages/common && npm run test)",
Expand Down
12 changes: 6 additions & 6 deletions packages/test-project/tests/app-e2e-dapp.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,12 @@ describe('Wallet Setup', () => {
await extensionPage.click('#createWallet')
})

test('Switch Ledger', async () => {
await extensionPage.waitForTimeout(2000)
await extensionPage.click('#selectLedger')
await extensionPage.waitForTimeout(500)
await extensionPage.click('#selectTestNet')
})
test('Switch Ledger', async () => {
await extensionPage.waitForSelector('#selectLedger');
await extensionPage.click('#selectLedger');
await extensionPage.waitForSelector('#selectTestNet');
await extensionPage.click('#selectTestNet');
});

test('Import Base Account', async () => {
await extensionPage.waitForSelector('#addAccount')
Expand Down
5 changes: 2 additions & 3 deletions packages/test-project/tests/basic-e2e-dapp.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,15 @@
await extensionPage.waitForSelector('#createWallet')
await extensionPage.type('#setPassword',unsafePassword);
await extensionPage.type('#confirmPassword',unsafePassword);
await extensionPage.waitForTimeout(2000)
await extensionPage.waitForSelector('#createWallet')
await extensionPage.click('#createWallet')
})

test('Switch Ledger', async () => {
await extensionPage.waitForTimeout(2000)
await extensionPage.waitForSelector('#selectLedger');
await extensionPage.screenshot({path: 'screenshots/test_waiting_for_page.png'})
await extensionPage.click('#selectLedger')
await extensionPage.waitForTimeout(500)
await extensionPage.waitForSelector('#selectTestNet');
await extensionPage.click('#selectTestNet')
})

Expand Down

0 comments on commit 1d39528

Please sign in to comment.