Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub actions backend tests #304

Conversation

j4qfrost
Copy link
Collaborator

@j4qfrost j4qfrost commented Sep 9, 2024

This will trigger when a PR is created and will update each time a commit is made to the branch. Setting up for linux first, macos will be straightforward and there will be pain points with windows.

j4qfrost and others added 30 commits August 26, 2024 05:43
Now using go 1.23! Tested this on dev, it works
Prints initial settings as defined in setup.yaml. Added for usability reasons - users keep getting confused about account balance and maximum allowable debt
* add test for HandleHTTPError

undelete

* more verbose http codes

* Update Dockerfile

Now using go 1.23! Tested this on dev, it works

* Update compose_dev.sh

Prints initial settings as defined in setup.yaml. Added for usability reasons - users keep getting confused about account balance and maximum allowable debt

* add failure condition test

* formatting and test standards

---------

Co-authored-by: Osnat Katz Moon <137817983+astrosnat@users.noreply.github.com>
* Moving test to appropriate location.

* Updating, including moving test location. Test not passing due to precision error but generally passing on the terminal up to 6 dits.

* market projection handler, not working.

* Update market projected probability.

* Safe uint conversion.

* Updating, adding noop change to push into pipeline.

* Update, test passing.

* Update, attempting to solve type converstion uint problem.

* Adding projected market layout.

* Update, still have react JSON parse error but layout added to buyshares.

* Market projection updates on buy shares side, upon button press.

* Update, change printf to print.
* Drafting out fees deduction functions and capability.

* Attempting working version of initialBetFee function.

* Draft adding fees.

* Update, adding tests.

* Adding working test for GetBetsForMarket

* Successful fee util test.

* Fees added on backend, tests passing.

* Updating such that user record submitted. However fee summing not working yet evidently.

* Working fees, at least initial fees.

* Updating test scenario passing, made more clear.

* Update Dockerfile

We need to switch to 3.0.14-1~deb12u2

* Removing logging.

* Adding fees, including communicating fees on front end.

* totalBetCount to userBetCount so as not to misconstrue meaning.

* Simplifying function, test passed.

* Simplifying naming.

* Updating new function name in test

* Changing test to got before want convention.

* Update marketid variable

* Add combined fee structure for more througough test.

* Reverting sale amount to 1 share.

* Reversing got want

---------

Co-authored-by: Osnat Katz Moon <137817983+astrosnat@users.noreply.github.com>
* fix: fixed the market buttons not showing on mobile

* fix: removed trade button on closed market

---------

Co-authored-by: Patrick Delaney <patrick.del@gmail.com>
)

* Make EconomicsConfig from component structs

Auto initialize config
Add support to inject config
Add support for testing the setup through test doubles
Use new fee for placing bets (EachBetFee)
Copy link
Member

@pwdel pwdel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not test this locally to ensure works. Looks good as far as I can tell, presuming you tested and it works. Just had one question, no notes.

isSidebarOpen ? 'translate-x-0' : '-translate-x-full'
} md:relative md:translate-x-0`}
className={`fixed top-0 left-0 z-30 w-48 h-screen bg-gray-800 text-white flex flex-col transition-transform duration-300 ease-in-out ${isSidebarOpen ? 'translate-x-0' : '-translate-x-full'
} md:relative md:translate-x-0`}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was a change in the sidebar logic needed? Is this a separate fix that you noticed or was this related to WSL rendering it differently?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must've been an auto lint I overlooked. I'll revert it then merge.

@j4qfrost j4qfrost merged commit 0a50b05 into openpredictionmarkets:main Sep 15, 2024
1 check passed
@j4qfrost j4qfrost deleted the feature/github-actions-backend-tests branch September 15, 2024 15:30
@j4qfrost j4qfrost restored the feature/github-actions-backend-tests branch September 28, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decide Whether to Run Golang Tests Prior to Launching App, Tests Must Pass to Launch
5 participants