nft-gallery icon indicating copy to clipboard operation
nft-gallery copied to clipboard

WIP: parallel tests + rmrk stats

Open petersopko opened this issue 2 years ago โ€ข 4 comments

Thank you for your contribution to the KodaDot NFT gallery. ๐Ÿ‘‡ _ Let's make a quick check before the contribution.

PR type

  • [ ] Bugfix
  • [ ] Feature
  • [ ] Refactoring

What's new?

  • [ ] PR closes #3841, closes #3681
  • [ ] Requires deployment <rubick/magick_issue>
  • [ ] test parallelization + stats test, coming soon

Before submitting Pull Request, please make sure:

  • [ ] My contribution builds clean without any errors or warnings
  • [ ] I've merged recent default branch -- main and I've no conflicts
  • [ ] I've tried to respect high code quality standards
  • [ ] I've didn't break any original functionality
  • [ ] I've posted a screenshot of demonstrated change in this PR

Optional

  • [ ] I've tested it at </rmrk/collection/26902bc2f7c20c546a-1FVG7>
  • [ ] I've tested PR on mobile and everything seems works
  • [ ] I found edge cases
  • [ ] I've written some unit tests ๐Ÿงช

Had issue bounty label?

  • [ ] Fill up your KSM address: Payout

Community participation

Screenshot

  • [ ] My fix has changed something on UI; a screenshot is best to understand changes for others.

petersopko avatar Sep 22 '22 16:09 petersopko

Deploy Preview for koda-nuxt ready!

Name Link
Latest commit 6391c898cd85d591f4282e3190949088b3820dd6
Latest deploy log https://app.netlify.com/sites/koda-nuxt/deploys/633c18683181c80009a19b58
Deploy Preview https://deploy-preview-4006--koda-nuxt.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Sep 22 '22 16:09 netlify[bot]

SUCCESS @petersopko PR for issue #3681 which is assigned to you. Please wait for review and don't hesitate to grab another issue in the meantime!

kodabot avatar Sep 22 '22 16:09 kodabot

SUCCESS @petersopko PR for issue #3841 which is assigned to you. Please wait for review and don't hesitate to grab another issue in the meantime!

kodabot avatar Sep 22 '22 16:09 kodabot



Test summary

39 โ€ข 1 โ€ข 9 โ€ข 0


Run details

Project kodadot/nft-gallery
Status Failed
Commit 86155006f8
Started Sep 27, 2022 1:22 PM
Ended Sep 27, 2022 1:26 PM
Duration 03:38 ๐Ÿ’ก
OS Windows 10.0.22000
Browser Electron 102

View run in Cypress Dashboard โžก๏ธ


Failures

cypress\e2e\rmrk-simple-mint.cy.ts 1ย Failed
1 simple mint in rmrk > should able to simple mint

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

cypress[bot] avatar Sep 27 '22 13:09 cypress[bot]

โœ…

image

petersopko avatar Sep 27 '22 13:09 petersopko

I need to ask for help from the pros here, I'm not making much progress on the parallelization part of the PR:

In order to parallelize the tests with cypress (not locally) cypress test needs to be recorded (happening with secret key which is saved in our GH repo already - it can be accessed through ${{ secrets.CYPRESS_RECORD_KEY }}).

However, here's what I'm getting when trying to record our tests to Cypress dashboard: image

Is it possible to start passing those keys to forked builds? this way, we can get to a point where the install and cache jobs gets saved in cypress dashboard and parallelized tests will run on virtual machines in the dashboard. ref: https://docs.cypress.io/guides/guides/parallelization#CI-parallelization-interactions

@kkukelka @preschian I know you guys have worked with both workflows and Cypress before ๐Ÿ™๐Ÿป I'm trying couple workflows there, feel free to push in any ideas you might have straight to the PR.

petersopko avatar Oct 02 '22 08:10 petersopko

I need to ask for help from the pros here, I'm not making much progress on the parallelization part of the PR:

In order to parallelize the tests with cypress (not locally) cypress test needs to be recorded (happening with secret key which is saved in our GH repo already - it can be accessed through ${{ secrets.CYPRESS_RECORD_KEY }}).

However, here's what I'm getting when trying to record our tests to Cypress dashboard: image

Is it possible to start passing those keys to forked builds? this way, we can get to a point where the install and cache jobs gets saved in cypress dashboard and parallelized tests will run on virtual machines in the dashboard. ref: https://docs.cypress.io/guides/guides/parallelization#CI-parallelization-interactions

@kkukelka @preschian I know you guys have worked with both workflows and Cypress before ๐Ÿ™๐Ÿป I'm trying couple workflows there, feel free to push in any ideas you might have straight to the PR.

i believe you have to set this CYPRESS_RECORD_KEY in the repository as well since we don't push our .env file to remote. maybe this article can help

kkukelka avatar Oct 03 '22 05:10 kkukelka

Is it possible to start passing those keys to forked builds?

hhmm, interesting ๐Ÿค”. maybe for cypress, we use another platform for CI (https://buildkite.com/ for example) and put that secrets.CYPRESS_RECORD_KEY into that platform

I need to test it out

preschian avatar Oct 04 '22 08:10 preschian

Code Climate has analyzed commit 6391c898 and detected 0 issues on this pull request.

View more on Code Climate.

codeclimate[bot] avatar Oct 04 '22 11:10 codeclimate[bot]

i believe you have to set this CYPRESS_RECORD_KEY in the repository as well since we don't push our .env file to remote. maybe this article can help

it is set as this (kodadot/nft-gallery) secret, I've tried to set it in my fork as well, that didn't do the job

petersopko avatar Oct 04 '22 11:10 petersopko

seems quite tricky ๐Ÿค” some alternative methods:

  • use https://circleci.com/, "If you are comfortable sharing secrets with anyone who forks your project and opens a PR, you can enable the Pass secrets to builds from forked pull requests option" https://circleci.com/docs/oss#pass-secrets-to-builds-from-forked-pull-requests
  • use gitlab as ci/cd. cons, need premium account https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/github_integration.html

preschian avatar Oct 06 '22 13:10 preschian

  • use https://circleci.com/, "If you are comfortable sharing secrets with anyone who forks your project and opens a PR, you can enable the Pass secrets to builds from forked pull requests option" https://circleci.com/docs/oss#pass-secrets-to-builds-from-forked-pull-requests

This would also enable the native Cypress solution ๐Ÿ˜„ I'd rather stick with that then

  • use gitlab as ci/cd. cons, need premium account https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/github_integration.html

Generally speaking, it would be better in my opinion to stick with one solution for E2E tests -> from actual tests to parallelization. @yangwao could we pass the cypress secret (saved in this repo) to other forks?

This would be the solution here, without requiring another CI/CD service (just Cypress + GH)

petersopko avatar Oct 07 '22 08:10 petersopko

expanding e2e test suite makes no sense without parallelization, this needs to get revisited once somebody manages to do that

petersopko avatar Oct 20 '22 09:10 petersopko