/strivio

A GitHub action for hosting Coding Competetion on GitHub

Primary LanguageDockerfileMIT LicenseMIT

Strivio Logo

docker build status dev.to blog link

Usage

Organizers

  1. Head to DropBox Sign In/ Create account and then click on this link DropBox Developer Page

Alternate Link : https://www.dropbox.com/developers/documentation

  • Click on App Console
  • Click on Create App
  • Click Full Dropbox
  • Give any name to app and Click create app
  1. After you Create your Dropbox App click on Generate Access token and Copy it.enter image description here

This token is to be shared with participants. This works as a login access key for the competetion.

  1. Create a File Known as 🗃️ "IO.yaml" for all the Input / Output Test Cases
  2. The File should Look like this
inputs:  
  input1:  
    1  
  input2:  
    2  
  input3:  
    3  
  input4:  
    4  
  input5:  
    5  
outputs:  
  output1:  
    2  
  output2:  
    3  
  output3:  
    4  
  output4:  
    5  
  output5:  
    6  
  1. Upload this to the Root Directory of Drop Box and done 😃!
  2. Send the OATH token to participants.

Participants

  1. In GitHub Repo open Settings/Secrets and click on add a Secret
  2. Name of the secret should be OATH and value should be the access token which the organizer gave you!

Example:

enter image description here

This should look like this.

enter image description here

  1. Now its time to start coding! Clone your repo and start working on the problem.

  2. Supported Programming Languages python, java, c++, c

  3. Create a file program.extension - supported extension.c .cpp .java .py

NOTE: for java Class name should be Main

  1. After Coding is done create a file in repo 🗃️ "lang.yaml"

  2. Add the below code.

language:
  python3
  1. Replace the name of Programming Language in the above code as follows.

python - write python3 java - write java c++ - write cpp c - write c

No language other than above are supported!

  1. Commit the code and push

  2. Head to GitHub and select Actions enter image description here

  3. Click on Set up a workflow yourself enter image description here

  4. Delete everything and paste the below code

name: Evaluation
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Results
      uses: jainal09/strivio@Production
      with:
        oath: ${{ secrets.oath }}

Click on start-commit

  1. Click on actions enter image description here

  2. Click on your last commit, click build, wait for the Build jainal09/strivio@Production to turn green ✔️ and after that click on Results 🤞 enter image description here

  3. Check if your code passed all the Test Case ✔️ or ❌

enter image description here

☝️Successful Build with all Test Case Passed🤘.

enter image description here

☝️Build Failed as Code Didn't Passed all the Test Cases😬.

Sample Test Repo - https://github.com/jainal09/strivio-in-action

Done! thats how you can host coding competetion on GitHub like Hackerrank etc

Docker Hub - https://hub.docker.com/r/jainal09/strivio