Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Unit Test Coverage Workflow #853

Closed
rndquu opened this issue Oct 11, 2023 · 11 comments
Closed

Unit Test Coverage Workflow #853

rndquu opened this issue Oct 11, 2023 · 11 comments

Comments

@rndquu
Copy link
Member

rndquu commented Oct 11, 2023

There's a pretty big technical debt in the bot's codebase (lack of unit tests, not optimally structured code, etc...). We can't ship new production builds any more without breaking an existing functionality.

We should setup a unit testing workflow and stop accepting PRs without unit tests and docs. This will cut down 80% of bounty hunters but the rest will write structured and maintainable code.

What should be done:
1. Setup jest in the bot's project
2. Add a single test
3. Add a script that runs unit tests in package.json

4. Add a workflow that runs unit tests on PRs and pushes to the development branch
5. Add a workflow that fails if test coverage has decreased in a PR compared to the development branch (as far as I remember we can simply authorize coveralls OAuth app in the bot's repository which brings this functionality out of the box)

@ubiquity/software-development Your input is really appreciated.

@0x4007
Copy link
Member

0x4007 commented Oct 11, 2023

not optimally structured code,

Handling this at #644

As for tests, @whilefoo produced some e2e tests already which I merged in and used a few times before redoing all of the code. I'll certainly make sure to get that back up and running before merging my refactor.

@0x4007 0x4007 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
@ubiquibot
Copy link

ubiquibot bot commented Oct 11, 2023

Permit generation skipped because the issue was not closed as completed

If you've enjoyed your experience in the DevPool, we'd appreciate your support. Follow Ubiquity on GitHub and star this repo. Your endorsement means the world to us and helps us grow!
We are excited to announce that the DevPool and UbiquiBot are now available to partners! Our ideal collaborators are globally distributed crypto-native organizations, who actively work on open source on GitHub, and excel in research & development. If you can introduce us to the repository maintainers in these types of companies, we have a special bonus in store for you!

@rndquu
Copy link
Member Author

rndquu commented Oct 11, 2023

@pavlovcik This issue also implied adding 2 workflows: running unit tests and checking test coverage for PRs. You sure we don't need those workflows? I don't think we should close this issue as not planned.

@PhantomCracker
Copy link

/start

@ubiquibot
Copy link

ubiquibot bot commented Oct 16, 2023

Deadline Mon, 16 Oct 2023 20:46:24 UTC
Registered Wallet 0xCAC0A8cF4cc7073b040c7fe6328Da7f229AF40A6
Tips:
  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address @user.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the bounty.

    @ubiquibot
    Copy link

    ubiquibot bot commented Oct 20, 2023

    Do you have any updates @PhantomCracker? If you would like to release the bounty back to the DevPool, please comment /stop
    Last activity time: Mon Oct 16 2023 18:46:17 GMT+0000 (Coordinated Universal Time)

    @ubiquibot
    Copy link

    ubiquibot bot commented Oct 23, 2023

    @PhantomCracker - Releasing the bounty back to dev pool because the allocated duration already ended!
    Last activity time: Mon Oct 16 2023 18:46:17 GMT+0000 (Coordinated Universal Time)

    @gentlementlegen
    Copy link
    Member

    @rndquu I can have a look if you want, since I've been settings tests in the other repos. However, we did not set the blockage on coverage decrease anywhere yet.

    @0x4007
    Copy link
    Member

    0x4007 commented Feb 21, 2024

    @rndquu I can have a look if you want, since I've been settings tests in the other repos. However, we did not set the blockage on coverage decrease anywhere yet.

    I think that anything related to this codebase, unless it's strictly event handler related, is not a good idea to invest into.

    That's why we actually removed this codebase from the directory.

    As you know we plan to move to using the kernel asap.

    @whilefoo how's it coming along to get it deployed?

    @rndquu
    Copy link
    Member Author

    rndquu commented Feb 21, 2024

    @rndquu I can have a look if you want, since I've been settings tests in the other repos. However, we did not set the blockage on coverage decrease anywhere yet.

    Thank for your endeavour

    I think this issue should be closed as "not planned" since we're moving to the plugin oriented architecture

    @0x4007 0x4007 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2024
    Copy link

    ubiquibot bot commented Feb 21, 2024

    # Issue was not closed as completed. Skipping.

    Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants