PyJaipur / PyJudge

Simple Programming Contest hosting software
MIT License
17 stars 29 forks source link

WIP: CI with travis-ci #130

Closed rishabhKalakoti closed 5 years ago

rishabhKalakoti commented 5 years ago

I made a custom CI configuration, not sure if this one is correct. I had a few problems.

Roadmap:

This can be done in separate PRs too, because tests might mess things up :)

fixes #125

rishabhKalakoti commented 5 years ago

As of now, its working fine on my repository. (installation also as tests)

rishabhKalakoti commented 5 years ago

@theSage21 I need help in better configuration settings for travis. Also what tests should I add apart from testing that the web server is running well.

theSage21 commented 5 years ago

hmm. I'm in a fix here.

  1. I don't have any experience with travis so help with that is going to be delayed
  2. I've usually built API servers which don't render html. we simply do an api level testing in that case. Again I'm lost here.

so ... I'll say let's do 2 things:

  1. code formatting checks
  2. api level checks
    • (if I asked for a contest is there some question in it?)
    • if I'm not logged in make sure I can't submit
rishabhKalakoti commented 5 years ago

How do i check if a user is logged in? I got no idea how to handle cookies (they are part of browser) in testing (i will try googling). One fix I can do (not sure if it will work), is check for a user in database and then send form queries one by one as we do in the browser.

rishabhKalakoti commented 5 years ago

(if I asked for a contest is there some question in it?) Can I check the above directly in the database?

rishabhKalakoti commented 5 years ago

@theSage21 let's wrap this one here. I am a little busy and we are also changing the question/contest framework, so API tests can be covered after that. This one would be enough to setup CI with format check and server check. An admin will need to activate this repository for travis-ci to complete this.

theSage21 commented 5 years ago

@rishabhKalakoti why don't you set up travis for this repo. I've added you as an admin. Once you're done you can de-escalate your privileges to prevent accidental admin actions on the repo.

rishabhKalakoti commented 5 years ago

@theSage21 I will get it done on Saturday.