Light-client: Make testing a PR easier

Created on 13 May 2020  路  11Comments  路  Source: raiden-network/light-client

Description

Currently we have got the problem, that it is difficult to get a branch/PR in a state where it can be tested by the reviewer.

We have discussed several solutions:

Additional actions:

  • Having a different account for testing
  • Test steps more detailed (exclude bugs)

Acceptance criteria

  • Decide on an approach and estimate after discussion

Tasks

  • [ ]
8 test discussion 馃挰 infrastructure 馃毀

Most helpful comment

Vercel makes it very easy but reusing the build artifacts makes sense as well since we already build the dapp+sdk on every branch push. Would only need to:

  • deploy it somewhere
  • make it unique per pull request
  • remove deployment when pull request gets closed/merged

If that's too complicated, downloading the artifacts and running them locally sounds good as well imo 馃憤 GH allows zip attachments with a max size of 25MB so should work for us

All 11 comments

Vercel makes it very easy but reusing the build artifacts makes sense as well since we already build the dapp+sdk on every branch push. Would only need to:

  • deploy it somewhere
  • make it unique per pull request
  • remove deployment when pull request gets closed/merged

If that's too complicated, downloading the artifacts and running them locally sounds good as well imo 馃憤 GH allows zip attachments with a max size of 25MB so should work for us

Seems to be ready for the iteration for me

@nephix @kelsos @andrevmatos Please remove the label if there is more refinement needed.

The vercel flow seems reasonable to me, and easy.

Zeit/Vercel's Now doesn't seem to offer a lot of monorepo support yet so it probably makes sense to go with a different option

https://github.com/zeit/now/issues/3547

Another option would be to use netlify/vercel and tell it via CLI to deploy the build artifacts that we build via CircleCI:

$ netlify deploy --dir raiden-dapp/dist --site 714de093-0a95-4dc4-a978-ff660e317d91 --auth NETLIFY_AUTH_TOKEN --json

{
  "site_id": "714de093-0a95-4dc4-a978-ff660e317d91",
  "site_name": "light-client-preview",
  "deploy_id": "5ebe756f0a2659511cf450be",
  "deploy_url": "https://5ebe756f0a2659511cf450be--light-client-preview.netlify.app",
  "logs": "https://app.netlify.com/sites/light-client-preview/deploys/5ebe756f0a2659511cf450be"
}

And then in a second step comment the deploy_url to the pull request (this orb might help? https://circleci.com/orbs/registry/orb/benjlevesque/pr-comment)

I feel like integrating it into the work flow may be a lot more work though than just calling it locally and then adding it to the pull request 馃

I already checked the review-apps but I am not sure about the cost of that.

The whole idea is to automate the deployment using CI, but where to deploy is a question. I had a discussion with Nils on that but I am still not sure about deploying new instances of anything on each PR.

@andrevmatos to create a server (docker image)

Briefly discussed with @kelsos to take out complexity.

If there is no objection we would just provide the tool @andrevmatos proposed that downloads the published artifacts from CircleCI, starts an express server, and serves the content on the dev/tester local machine without publishing it on a remote server.

Decided in the daily: We go with the simple local approach :)

I'm not sure what simple local approach means... for me, a simple local approach is what we have currently: checkout branch, build and serve. Simpler local than that, could only be download and serve, but that's not less work than what we have. And beyond that, just do this automatically upon accessing a URL of a service hosted somewhere. I'm looking for options on how it could look like local or remote.

Was this page helpful?
0 / 5 - 0 ratings