WIP: Contribution contracts tests #159

Closed
haythem96 wants to merge 20 commits from tests/contracts-contribution into master
Showing only changes of commit c2ada23590 - Show all commits

View File

@ -15,21 +15,25 @@ cache:
- apps/token/node_modules
- apps/vault/node_modules
env:
- TASK=lint:wrapper
- TASK=lint:contract-tests
- TASK=test:token
- TASK=test:contributor
- TASK=test:contribution
- TASK=test:proposal
raucao commented 2019-09-21 07:37:44 +00:00 (Migrated from github.com)
Review

This should be the same as the test script itself, because && is supposed to exit with 1, if any of the commands on the way exit with 1.

This should be the same as the test script itself, because `&&` is supposed to exit with 1, if any of the commands on the way exit with 1.
haythem96 commented 2019-09-21 12:35:10 +00:00 (Migrated from github.com)
Review

yeah true, I changed that also to

env:
  - TASK=lint:wrapper
  - TASK=lint:contract-tests
  - TASK=test:token
  - TASK=test:contributor
  - TASK=test:contribution
  - TASK=test:proposal

before_script:
  - npm run devchain > /dev/null &
  - sleep 5

script:
  - travis_wait 60 npm run $TASK

It is the same also, but > /dev/null & to not show the output and using TASK for better visualization I think...
But the thing is there is an error in Contribution tests, but it doesn't exit with 1!

yeah true, I changed that also to ``` env: - TASK=lint:wrapper - TASK=lint:contract-tests - TASK=test:token - TASK=test:contributor - TASK=test:contribution - TASK=test:proposal before_script: - npm run devchain > /dev/null & - sleep 5 script: - travis_wait 60 npm run $TASK ``` It is the same also, but `> /dev/null &` to not show the output and using `TASK` for better visualization I think... But the thing is there is an error in Contribution tests, but it doesn't exit with 1!
raucao commented 2019-09-22 08:46:26 +00:00 (Migrated from github.com)
Review

I don't see how the env vars make it clearer. I think it's actually less understandable that way. In fact, I wouldn't even know off the top of my head what happens when you assign the same env variable twice.

But the thing is there is an error in Contribution tests, but it doesn't exit with 1!

Yes, that's the thing that needs to be fixed I think. Not how the tests are run. The test task should just be npm test and nothing else, in my opinion.

I don't see how the env vars make it clearer. I think it's actually less understandable that way. In fact, I wouldn't even know off the top of my head what happens when you assign the same env variable twice. > But the thing is there is an error in Contribution tests, but it doesn't exit with 1! Yes, that's the thing that needs to be fixed I think. Not how the tests are run. The test task should just be `npm test` and nothing else, in my opinion.
haythem96 commented 2019-09-23 00:24:50 +00:00 (Migrated from github.com)
Review

What I meant by the env vars make it clearer, in Travis u don't need to look at the whole log in case a test fail...
1

What I meant by the env vars make it clearer, in Travis u don't need to look at the whole log in case a test fail... ![1](https://user-images.githubusercontent.com/17862704/65396697-eb146900-dda0-11e9-9186-2184cbf79106.png)
raucao commented 2019-09-23 10:01:00 +00:00 (Migrated from github.com)
Review

Oh, I see. The feature you're looking for is the build matrix:

https://docs.travis-ci.com/user/customizing-the-build/#naming-jobs-within-matrices

Oh, I see. The feature you're looking for is the build matrix: https://docs.travis-ci.com/user/customizing-the-build/#naming-jobs-within-matrices
install:
- npm install -g @aragon/cli
- npm install -g truffle
- npm install
before_script:
- npm run devchain &
- npm run devchain > /dev/null &
- sleep 5
script:
- npm run lint:wrapper
- npm run lint:contract-tests
- npm run test:token
- npm run test:contributor
- npm run test:contribution
- npm run test:proposal
- travis_wait 60 npm run $TASK
branches:
only: