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

Add testing before submission #41

Closed
SlyBouhafs opened this issue Mar 12, 2022 · 3 comments
Closed

Add testing before submission #41

SlyBouhafs opened this issue Mar 12, 2022 · 3 comments

Comments

@SlyBouhafs
Copy link
Member

SlyBouhafs commented Mar 12, 2022

The idea is to add add testing to the submitting process, so that once a user selects the challenge to be submitted, it will pass through the tests before getting sent to c0d3.

This will make the review process a bit easier, mentors won't have to worry if the code works or not and can focus on other aspects of the review.

I will add more information once i start working on the issue.

@flacial
Copy link
Member

flacial commented Mar 16, 2022

I think it can be done using husky like https://github.com/garageScript/c0d3-app/blob/master/.husky/pre-push but for c0d3 submit

@SlyBouhafs
Copy link
Member Author

SlyBouhafs commented Oct 11, 2023

I think it can be done using husky like https://github.com/garageScript/c0d3-app/blob/master/.husky/pre-push but for c0d3 submit

That's a good proposition but I think husky is geared more towards git hooks, when a students submits a solution the cli mostly takes a diff and sends it back to the server, there's no git action to attach it to (commit/push), so i think just calling yarn test before submitting and exiting once it fails a test will do the job.

Edit: Another option is to attach it the pre-commit, once a user commits a solution, we run the tests.

@flacial
Copy link
Member

flacial commented Oct 11, 2023

@SlyBouhafs Good solution! Let's explore it!

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

No branches or pull requests

2 participants