Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into token-manager-loadi…
Browse files Browse the repository at this point in the history
…ng-state

* origin/master:
  Apps: update for @aragon/rpc-messenger's new deferred behaviour (#871)
  Travis: optimizations and refactor to use build stages (#865)
  Update Travis CI badge (#866)
  Hoist common dependencies (#863)
  • Loading branch information
2color committed May 29, 2019
2 parents 7d8e789 + 9c2a422 commit cc2aa66
Show file tree
Hide file tree
Showing 22 changed files with 103 additions and 61 deletions.
71 changes: 44 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,51 @@ node_js:
env:
global:
- INSTALL_FRONTEND=false
matrix:
- TASK=lint
- TASK=test:agent
- TASK=test:finance
- TASK=test:survey
- TASK=test:token-manager
- TASK=test:token-manager:app INSTALL_FRONTEND=true
- TASK=test:vault
- TASK=test:voting
- TASK=test:payroll
- TASK=coverage:agent
- TASK=coverage:finance
- TASK=coverage:survey
- TASK=coverage:token-manager
- TASK=coverage:vault
- TASK=coverage:voting
- TASK=coverage:payroll
- TASK=test:shared
matrix:
allow_failures:
- env: TASK=coverage:agent
- env: TASK=coverage:finance
- env: TASK=coverage:payroll
install:
- travis_wait 60 npm install
before_script:
- npm prune
script:
- travis_wait 60 npm run $TASK
jobs:
allow_failures:
- script: npm run coverage:agent
- script: npm run coverage:payroll
include:
- stage: tests
script: npm run lint
name: "Lint"
- script: npm run test:agent
name: "Agent"
- script: npm run test:finance
name: "Finance"
- script: npm run test:payroll
name: "Payroll"
- script: npm run test:survey
name: "Survey"
- script: npm run test:token-manager
name: "Token Manager"
- script: npm run test:token-manager:app
name: "Token Manager frontend"
env:
- INSTALL_FRONTEND=true
- script: npm run test:vault
name: "Vault"
- script: npm run test:voting
name: "Voting"
- script: npm run test:shared
name: "Shared"

- stage: coverage
script: npm run coverage:agent
name: "Agent"
- script: npm run coverage:finance
name: "Finance"
- script: npm run coverage:payroll
name: "Payroll"
- script: npm run coverage:survey
name: "Survey"
- script: npm run coverage:token-manager
name: "Token Manager"
- script: npm run coverage:vault
name: "Vault"
- script: npm run coverage:voting
name: "Voting"
after_success:
- ./node_modules/.bin/lcov-result-merger 'apps/*/coverage/lcov.info' | ./node_modules/.bin/coveralls
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aragon Apps <img align="right" src="https://raw.githubusercontent.com/aragon/design/master/readme-logo.png" height="80px" /> [![Travis branch](https://img.shields.io/travis/aragon/aragon-apps/master.svg?style=for-the-badge)](https://travis-ci.org/aragon/aragon-apps) [![Coveralls branch](https://img.shields.io/coveralls/aragon/aragon-apps/master.svg?style=for-the-badge)](https://coveralls.io/github/aragon/aragon-apps)
# Aragon Apps <img align="right" src="https://raw.githubusercontent.com/aragon/design/master/readme-logo.png" height="80px" /> [![Travis branch](https://img.shields.io/travis/aragon/aragon-apps/master.svg?style=for-the-badge)](https://travis-ci.com/aragon/aragon-apps) [![Coveralls branch](https://img.shields.io/coveralls/aragon/aragon-apps/master.svg?style=for-the-badge)](https://coveralls.io/github/aragon/aragon-apps)

## Apps

Expand Down
4 changes: 3 additions & 1 deletion apps/agent/.solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module.exports = {
norpc: true,
copyPackages: ['@aragon/os', '@aragon/apps-vault'],
skipFiles: [
'test'
'test',
'@aragon/os',
'@aragon/apps-vault/contracts/Vault.sol',
]
}
5 changes: 3 additions & 2 deletions apps/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@
"description": "",
"devDependencies": {
"@aragon/apps-shared-migrations": "1.0.0",
"@aragon/cli": "^5.6.0",
"@aragon/cli": "~5.6.0",
"@aragon/test-helpers": "^1.1.0",
"eth-gas-reporter": "^0.1.1",
"eth-gas-reporter": "^0.2.0",
"ethereumjs-testrpc-sc": "^6.1.6",
"ethereumjs-util": "^6.1.0",
"ganache-cli": "^6.4.3",
"solidity-coverage": "^0.5.11",
Expand Down
2 changes: 2 additions & 0 deletions apps/finance/.solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module.exports = {
copyPackages: ['@aragon/os', '@aragon/apps-vault', '@aragon/test-helpers'],
skipFiles: [
'test',
'@aragon/os',
'@aragon/apps-vault/contracts/Vault.sol',
'@aragon/test-helpers/contracts/TimeHelpersMock.sol',
]
}
12 changes: 5 additions & 7 deletions apps/finance/app/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,9 @@ class App extends React.Component {
}
handleWithdraw = (tokenAddress, recipient, amount, reference) => {
// Immediate, one-time payment
this.props.api.newImmediatePayment(
tokenAddress,
recipient,
amount,
reference
)
this.props.api
.newImmediatePayment(tokenAddress, recipient, amount, reference)
.toPromise() // Don't care about response
this.handleNewTransferClose()
}
handleDeposit = async (tokenAddress, amount, reference) => {
Expand Down Expand Up @@ -72,7 +69,8 @@ class App extends React.Component {
}
}

api.deposit(tokenAddress, amount, reference, intentParams)
// Don't care about response
api.deposit(tokenAddress, amount, reference, intentParams).toPromise()
this.handleNewTransferClose()
}

Expand Down
5 changes: 3 additions & 2 deletions apps/finance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@
"devDependencies": {
"@aragon/apps-shared-migrations": "1.0.0",
"@aragon/apps-shared-scripts": "^1.0.0",
"@aragon/cli": "^5.6.0",
"@aragon/cli": "~5.6.0",
"@aragon/test-helpers": "^1.1.0",
"eth-gas-reporter": "^0.1.1",
"eth-gas-reporter": "^0.2.0",
"ethereumjs-testrpc-sc": "^6.1.6",
"ganache-cli": "^6.4.3",
"solidity-coverage": "^0.5.11",
"solium": "^1.2.3",
Expand Down
2 changes: 2 additions & 0 deletions apps/survey/.solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module.exports = {
copyPackages: ['@aragon/os', '@aragon/apps-shared-minime', '@aragon/test-helpers'],
skipFiles: [
'test',
'@aragon/os',
'@aragon/apps-shared-minime/contracts/MiniMeToken.sol',
'@aragon/test-helpers/contracts/TimeHelpersMock.sol',
]
}
5 changes: 3 additions & 2 deletions apps/survey/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
"devDependencies": {
"@aragon/apps-shared-migrations": "1.0.0",
"@aragon/apps-shared-scripts": "^1.0.0",
"@aragon/cli": "^5.6.0",
"@aragon/cli": "~5.6.0",
"@aragon/test-helpers": "^1.1.0",
"eth-gas-reporter": "^0.1.1",
"eth-gas-reporter": "^0.2.0",
"ethereumjs-testrpc-sc": "^6.1.6",
"ganache-cli": "^6.4.3",
"solidity-coverage": "^0.5.11",
"solium": "^1.2.3",
Expand Down
2 changes: 2 additions & 0 deletions apps/token-manager/.solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module.exports = {
copyPackages: ['@aragon/os', '@aragon/apps-shared-minime', '@aragon/test-helpers'],
skipFiles: [
'test',
'@aragon/os',
'@aragon/apps-shared-minime/contracts/MiniMeToken.sol',
'@aragon/test-helpers/contracts/TimeHelpersMock.sol',
]
}
5 changes: 3 additions & 2 deletions apps/token-manager/app/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ class App extends React.PureComponent {
handleUpdateTokens = ({ amount, holder, mode }) => {
const { api } = this.props

// Don't care about responses
if (mode === 'assign') {
api.mint(holder, amount)
api.mint(holder, amount).toPromise()
}
if (mode === 'remove') {
api.burn(holder, amount)
api.burn(holder, amount).toPromise()
}

this.handleSidepanelClose()
Expand Down
5 changes: 3 additions & 2 deletions apps/token-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@
"devDependencies": {
"@aragon/apps-shared-migrations": "1.0.0",
"@aragon/apps-shared-scripts": "^1.0.0",
"@aragon/cli": "^5.6.0",
"@aragon/cli": "~5.6.0",
"@aragon/test-helpers": "^1.1.0",
"eth-gas-reporter": "^0.1.1",
"eth-gas-reporter": "^0.2.0",
"ethereumjs-testrpc-sc": "^6.1.6",
"ganache-cli": "^6.4.3",
"solidity-coverage": "^0.5.11",
"solium": "^1.2.3",
Expand Down
1 change: 1 addition & 0 deletions apps/vault/.solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ module.exports = {
copyPackages: ['@aragon/os'],
skipFiles: [
'test',
'@aragon/os',
]
}
5 changes: 3 additions & 2 deletions apps/vault/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@
"description": "",
"devDependencies": {
"@aragon/apps-shared-migrations": "1.0.0",
"@aragon/cli": "^5.6.0",
"@aragon/cli": "~5.6.0",
"@aragon/test-helpers": "^1.1.0",
"eth-ens-namehash": "^2.0.8",
"eth-gas-reporter": "^0.1.1",
"eth-gas-reporter": "^0.2.0",
"ethereumjs-testrpc-sc": "^6.1.6",
"ganache-cli": "^6.4.3",
"solidity-coverage": "^0.5.11",
"solium": "^1.2.3",
Expand Down
2 changes: 2 additions & 0 deletions apps/voting/.solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module.exports = {
copyPackages: ['@aragon/os', '@aragon/apps-shared-minime', '@aragon/test-helpers'],
skipFiles: [
'test',
'@aragon/os',
'@aragon/apps-shared-minime/contracts/MiniMeToken.sol',
'@aragon/test-helpers/contracts/TimeHelpersMock.sol',
]
}
9 changes: 6 additions & 3 deletions apps/voting/app/src/app-logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export function useCreateVoteAction(onDone) {
return useCallback(
question => {
if (api) {
api.newVote(EMPTY_CALLSCRIPT, question)
// Don't care about response
api.newVote(EMPTY_CALLSCRIPT, question).toPromise()
onDone()
}
},
Expand All @@ -50,7 +51,8 @@ export function useVoteAction(onDone) {
const api = useApi()
return useCallback(
(voteId, voteType, executesIfDecided = true) => {
api.vote(voteId, voteType === VOTE_YEA, executesIfDecided)
// Don't care about response
api.vote(voteId, voteType === VOTE_YEA, executesIfDecided).toPromise()
onDone()
},
[api, onDone]
Expand All @@ -62,7 +64,8 @@ export function useExecuteAction(onDone) {
const api = useApi()
return useCallback(
voteId => {
api.executeVote(voteId)
// Don't care about response
api.executeVote(voteId).toPromise()
onDone()
},
[api, onDone]
Expand Down
5 changes: 3 additions & 2 deletions apps/voting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@
"devDependencies": {
"@aragon/apps-shared-migrations": "1.0.0",
"@aragon/apps-shared-scripts": "^1.0.0",
"@aragon/cli": "^5.6.0",
"@aragon/cli": "~5.6.0",
"@aragon/test-helpers": "^1.1.0",
"eth-gas-reporter": "^0.1.5",
"eth-gas-reporter": "^0.2.0",
"ethereumjs-testrpc-sc": "^6.1.6",
"ganache-cli": "^6.4.3",
"solidity-coverage": "^0.5.11",
"solidity-sha3": "^0.4.1",
Expand Down
5 changes: 5 additions & 0 deletions future-apps/payroll/.solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ module.exports = {
norpc: true,
copyPackages: ['@aragon/os', '@aragon/apps-finance', '@aragon/apps-vault', '@aragon/test-helpers'],
skipFiles: [
'PayrollKit.sol',
'test',
'@aragon/os',
'@aragon/apps-vault/contracts/Finance.sol',
'@aragon/apps-vault/contracts/Vault.sol',
'@aragon/ppf-contracts',
'@aragon/test-helpers/contracts/TimeHelpersMock.sol',
]
}
5 changes: 3 additions & 2 deletions future-apps/payroll/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@
"@aragon/apps-shared-scripts": "^1.0.0",
"@aragon/apps-token-manager": "2.0.0",
"@aragon/apps-vault": "4.0.0",
"@aragon/cli": "~5.6.2",
"@aragon/cli": "~5.6.0",
"@aragon/test-helpers": "^1.2.0",
"eth-gas-reporter": "^0.1.12",
"eth-gas-reporter": "^0.2.0",
"ethereumjs-testrpc-sc": "^6.1.6",
"ganache-cli": "^6.4.3",
"solidity-coverage": "^0.5.11",
"solium": "^1.2.3",
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
"license": "(GPL-3.0-or-later OR AGPL-3.0-or-later)",
"devDependencies": {
"coveralls": "^3.0.1",
"ganache-cli": "^6.1.0",
"lcov-result-merger": "^3.1.0",
"lerna": "^3.11.1"
"lerna": "^3.14.1"
},
"scripts": {
"install": "node scripts/install",
"bootstrap": "lerna bootstrap --nohoist=@aragon/os",
"bootstrap": "lerna bootstrap --hoist --nohoist=@aragon/os --nohoist=@aragon/apps-shared-minime",
"bootstrap:ci": "npm run bootstrap -- --no-ci",
"clean": "git clean -fdxi apps future-apps shared",
"test": "npm run test:all",
Expand Down
2 changes: 1 addition & 1 deletion scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ if (inCI) {
execute('npm run bootstrap:ci', { stdio: 'inherit' })
} else {
process.env.INSTALL_FRONTEND = true
execute('npm run bootstrap', { stdio: 'inherit' })
execute('npm run bootstrap -- --nohoist=@aragon/cli', { stdio: 'inherit' })
}
5 changes: 3 additions & 2 deletions shared/minime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
"devDependencies": {
"@aragon/apps-shared-migrations": "1.0.0",
"@aragon/test-helpers": "^1.0.1",
"ganache-cli": "6.1.8",
"solidity-coverage": "0.5.8",
"ethereumjs-testrpc-sc": "^6.1.6",
"ganache-cli": "^6.4.3",
"solidity-coverage": "^0.5.11",
"truffle": "4.1.14",
"truffle-extract": "^1.2.1"
}
Expand Down

0 comments on commit cc2aa66

Please sign in to comment.